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

storyteq-connector-jw-player

v1.0.21

Published

A JWPlayer connector for the StoryTEQ API to simplify video loading, parameter values and video analytics.

Downloads

15

Readme

storyteq-connector-jw-player

A JWPlayer connector for the StoryTEQ API to simplify the loading of video data and tracking video analytics. The connector uses the unique hash generated by StoryTEQ API when creating a video as a reference to load video data and generate analytics.

The analytics are visible in the StoryTEQ dashboard which is currently in beta. Please contact us if you haven't received a login yet.

Dependencies

Loading the connector into your page is fairly easy, you can include the script directly from our CDN. Make sure to include the script in the head of your page like this:

<script  type="text/javascript"  src="https://storage.googleapis.com/storyteq/platform/connector/storyteq-connector-jw-player.min.js"></script>

Otherwise you can install the connector as an npm package using the following command:

npm install storyteq-connector-jw-player

Or manually import the connector by downloading this repository.

<script  type="text/javascript"  src="storyteq-connector-jw-player.js"></script>

Altough JW player is included in the connector, it's possible to use your own JW player license (version 8). In that case please include the StoryTEQ connector after loading your own JW player.

<script type="text/javascript" src="https://content.jwplatform.com/libraries/aBC1DEf2.js"></script>
<script type="text/javascript" src="https://storage.googleapis.com/storyteq/platform/connector/storyteq-connector-jw-player.min.js"></script>

Usage

After loading the script into your page, the connector needs to be configured. This is done by defining values for a few parameters in the following fashion:

var connector = new StoryteqConnectorJwPlayer({
	videoPlayerId : 'jwplayer',
	videoParameterName : 'key'
});

Not all parameters are required. Please check out the table below and example.html in this repository for an example of a fully specced connector.

|parameter|type|description|required| |--|--|--|--| |videoPlayerId|string|The id of the HTML-element where the video player should be loaded.|yes| |videoHash|string|The hash used to directly retrieve the video and send analytics events to.|not required if videoParameterName or mediaData is filled| |videoParameterName|string|The URL parameter where the hash is obtained from.|not required if videoHash or mediaData is filled| |mediaData|json|The full media data if already previously obtained from the API.|not required if videoHash or videoParameterName is filled| |mediaid|string|JWPlayer mediaid, used for JWPlayer tracking.|no| |dataCallbackFunction|string|The name of the function which is called after video data has been loaded from the StoryTEQ API. This video data can for example be used for greeting the visitor with a personal message or prefilling a form. Video data parameter keys are similar to your template parameter keys.|no| |verbose|bool|Enable console logging for the connector.|no| |defaultUrls|object|Define fallback URL's for when no hash is provided in the URL.|no| |playerSetup|object|Define other player properties according to https://developer.jwplayer.com/jw-player/docs/developer-guide/customization/configuration-reference/|no|

Testing

If everything is set up correctly, you can test the connector. To create a valid URL, attach the videoParameterName as a GET parameter to your base URL, then add the video's unique hash as a value. For example:

https://domain.com?key=9e0627ae3c707b451c9ac8e1408563a1

When you visit your page, the generated video should automatically be loaded.

Support

If you run into trouble using the connector, please contact us.