npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@bcaster/bcaster-feed-widget

v0.0.4

Published

An embeddable web widget for showing bcaster feed items

Downloads

7

Readme

bcaster-feed-widget

An Embeddable web widget for media feeds powered by Bcaster

Getting Started

The BCaster Feed Widget can be accessed via CDN UNPKG or CDN JSDELIVR as well as NPM. When imported via CDN, it exposes a global BCasterFeedWidget which accepts configuration arguments

Example Usage

To get the BCaster Feed 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

⚠️ In order for the widget to mount, you are required to have an empty div with an id bcaster-feed-widget in your html page. The div should be on the page before the mount event is triggered

<div id="bcaster-feed-widget"></div>

Embedding via CDN

<script src="https://unpkg.com/@bcaster/[email protected]/dist/bcaster-feed-widget.js"></script>
<script>
  const feedWidget = new BCasterFeedWidget({
    apiKey: '53d83cs45-1csauy-47c5sfde-80ffad8-45eefsds031de',
    apiSecret: '7632vqeldh286vqis89112s5d7vd2938d29dbd286d98b2',
    feedId: '5623dxq65d2o9a9u02h29h',
  });
  feedWidget.mount();
</script>

Embedding via NPM (ES5 and older)

First install the package by running npm install @bcaster/bcaster-feed-widget or yarn add @bcaster/bcaster-feed-widget

const BCasterFeedWidget = require('@bcaster/bcaster-feed-widget');
const feedWidget = new BCasterFeedWidget({
  apiKey: '53d83cs45-1csauy-47c5sfde-80ffad8-45eefsds031de',
  apiSecret: '7632vqeldh286vqis89112s5d7vd2938d29dbd286d98b2',
  feedId: '5623dxq65d2o9a9u02h29h',
});
feedWidget.mount();

Embedding via NPM (ES6 and later)

First install the package by running npm install @bcaster/bcaster-feed-widget or yarn add @bcaster/bcaster-feed-widget

import BCasterFeedWidget from '@bcaster/bcaster-feed-widget';

const feedWidget = new BCasterFeedWidget({
  apiKey: '53d83cs45-1csauy-47c5sfde-80ffad8-45eefsds031de',
  apiSecret: '7632vqeldh286vqis89112s5d7vd2938d29dbd286d98b2',
  feedId: '5623dxq65d2o9a9u02h29h',
});
feedWidget.mount();

Configuration Options

The Bcaster Feed widget library exposes a default BCasterFeedWidget 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.apiKey (Required) The client api key
@param {String} args.apiSecret (Required) The client api secret
@param {String} args.feedId (Required) The ID of a given feed
@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 {Number || String} args.numOfItems (Optional) {defaults to 20} The number of items to be displayed as an embeded feed
@param {String} args.lang (Optional) {Defaults to 'en'} Language attribute for localization
@param {Object} [args.divStyle] (Optional) Configuration values for the feed div style
@param {Number} [args.divStyle.height] (Optional) {Defaults to 200} Height for the media feed div {unit value in `px`}
@param {Number} [args.divStyle.width] (Optional) Width for the media feed div {unit value in `%`}
@param {String} [args.divStyle.orientation] (Optional) {Defaults to 'vertical'} The orientation of the feed div scrolling direction i.e. (either 'vertical' or 'horizontal')

@example
const feedWidget = new BCasterFeedWidget({
  apiKey: '53d83cs45-1csauy-47c5sfde-80ffad8-45eefsds031de',
  apiSecret: '7632vqeldh286vqis89112s5d7vd2938d29dbd286d98b2',
  feedId: '5623dxq65d2o9a9u02h29h',
  mode: 'development',
  numOfItems: 20,
  lang: 'en',
});

Supported Languages

Currently the following language options are supported

  • en - English
  • fi - Finnish

CHANGELOG

Version 0.0.1

  1. Bcaster Feed Web embeddable widget

Version 0.0.2

  1. Map esc key to closing the modal to ensure accessibility.

Version 0.0.3

  1. Update media card styles - margins.

Version 0.0.4

  1. Add Upload Type and Media Viewer Link to Overview Modal.