
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@bcaster/bcaster-lite-widget
Advanced tools
> The BCaster Intelligent Community Camera (ICC) embeddable widget
The BCaster Intelligent Community Camera (ICC) embeddable widget
The BCaster ICC Widget can be installed/imported via
When imported via CDN, it exposes a global BCasterLiteWidget
which accepts configuration arguments
To get the BCaster ICC Widget working, copy any of the following code snippet examples that apply, into your web project and replace the appId value with your unique bcaster lite app Id
gotten from the BCaster Dashboard Credentials section.
⚠️ In order for the widget to mount, you are required to have an empty div (if using the default widget) or an anchor tag (if providing your own custom widget) with an id
bcaster-widget
in your html page. The div or anchor tag should be on the page before themount
function is triggered.
// For default widget
<div id="bcaster-widget"></div>
or
// For a user custom widget - ensure the <a> tag has a blank href attribute
<a id="bcaster-widget" href="">
// Custom user html
</a>
/* Using the default widget */
<script src="https://unpkg.com/@bcaster/bcaster-lite-widget@1.0.0/dist/bcaster-lite-widget.js"></script>
<script>
const widget = new BCasterLiteWidget({
appId: '7ddc01afa5f5e4d10d80eff0d173a8d1e0a3',
});
widget.mount();
</script>
or
/* Using a custom defined widget */
<script src="https://unpkg.com/@bcaster/bcaster-lite-widget@1.0.0/dist/bcaster-lite-widget.js"></script>
<script>
const widget = new BCasterLiteWidget({
appId: '7ddc01afa5f5e4d10d80eff0d173a8d1e0a3',
userDefinedWidget: true,
});
widget.mount();
</script>
First install the package by running
npm install @bcaster/bcaster-lite-widget
oryarn add @bcaster/bcaster-lite-widget
/* Using the default widget */
const BCasterLiteWidget = require('@bcaster/bcaster-lite-widget')
const widget = new BCasterLiteWidget({
appId:'7ddc01afa5f5e4d10d80eff0d173a8d1e0a3',
});
widget.mount();
or
/* Using a custom defined widget */
const BCasterLiteWidget = require('@bcaster/bcaster-lite-widget')
const widget = new BCasterLiteWidget({
appId:'7ddc01afa5f5e4d10d80eff0d173a8d1e0a3',
userDefinedWidget: true,
});
widget.mount();
First install the package by running
npm install @bcaster/bcaster-lite-widget
oryarn add @bcaster/bcaster-lite-widget
/* Using the default widget */
import BCasterLiteWidget from '@bcaster/bcaster-lite-widget'
const widget = new BCasterLiteWidget({
appId:'7ddc01afa5f5e4d10d80eff0d173a8d1e0a3',
});
widget.mount();
or
/* Using a custom defined widget */
import BCasterLiteWidget from '@bcaster/bcaster-lite-widget'
const widget = new BCasterLiteWidget({
appId:'7ddc01afa5f5e4d10d80eff0d173a8d1e0a3',
userDefinedWidget: true,
});
widget.mount();
The Bcaster Lite widget library exposes a default BCasterLiteWidget Javascript class which accepts configuration options in the form of a standard Javascript Object. The configuration options signature are as follows
@param {Object} args Configuration values
@param {String} args.appId (Required) The unique App ID - Retrieved from the BCaster Dashboard
@param {Boolean} args.mobileView (Optional) {Defaults to true} Mobile view option indicating if widget should be visible only on mobile
@param {String} args.mode (Optional) {Defaults to `production`} Mode option for switching between `development` and `production`. This option allows the possibility to run in a sandbox environment
@param {String} args.lang (Optional) {Defaults to `en`} Language attribute for localization
@param {String} args.tag (Optional) {Defaults to the unique label} Tag defined for media categorization - Retrieved from the BCaster Dashboard
@param {String} args.accepts (Optional) {Defaults to image} Depicts the mediaType that should be accepted - Permitted values are one of `video`, `image` or `all`.
@param {Boolean} args.userDefinedWidget (Optional) {Default False} A boolean value to determine of the user would prefer to use thier own widget
@example
const widget = new BCasterLiteWidget({
appId: 'zf7TJ9r',
mobileView: false,
mode: 'development',
lang: 'en',
tag: 'bcaster',
accepts: 'image',
userDefinedWidget: false
})
Currently the following language options are supported
en
- Englishfi
- FinnishAccepts
image
- Allows images only.video
- Allows videos only.all
- Allows both images and videos.🚨 IMPORTANT CAVEAT 🚨
This web widget programatically triggers a new tab which opens a specific instance of the bcaster web app that is custom to your appId. If you have restrictions/policy on your website that blocks opening new tabs then consider adding
https://bcaster.com
to your allowList.We open a new tab and connect to your web app instance via
https
so the possibilities of it being blocked are quite slim however if it so happens that you have such policy even for secure connections then please do consider the above caveat.
mode
configuration option.tag
option to enable better media content categorization.tag
option from configuration options.label
option to configuartion options.tag
option to enable better media content categorization.tag
reference error.label
option.userDefinedWidget
option to enable users define custom widgets.aria-label
to widget link in order to conform to accessibility web standards.accepts
to configuration initialization options. This provides the possibility to select the prefered media type that should be allowed from the app. It is set to image
by default, with the other options being video
and all
.webapp
if a tag is not provided. This ensures consistency in the URL construction.FAQs
> The BCaster Intelligent Community Camera (ICC) embeddable widget
We found that @bcaster/bcaster-lite-widget demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.