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

videojs-flash

v2.2.1

Published

The official Flash tech package for Video.js.

Downloads

63,412

Readme

videojs-flash

Build Status Greenkeeper badge Slack Status

NPM

The official flash tech for the videojs player.

NOTE: This should only be used with Video.js >= 6.0.0 as the flash tech is build into versions before that!

Table of Contents

Installation

npm install --save videojs-flash

The npm installation is preferred, but Bower works, too.

bower install  --save videojs-flash

You can also use it via a CDN:

<script src="https://cdn.jsdelivr.net/npm/videojs-flash@2/dist/videojs-flash.min.js"></script>

Adding the Flash Tech to video.js

To include videojs-flash on your website or web application, use any of the following methods.

<script> Tag

This is the simplest case. Get the script in whatever way you prefer and include the tech after you include video.js, so that the videojs global is available.

<script src="//path/to/video.min.js"></script>
<script src="//path/to/videojs-flash.min.js"></script>
<script>
  var player = videojs('my-video');
</script>

Browserify

When using with Browserify, install videojs-flash via npm and require the tech as you would any other module.

var videojs = require('video.js');

// The actual tech function is registered to video.js automatically; so, there
// is no need to assign it to a variable.
require('videojs-flash');

RequireJS/AMD

When using with RequireJS (or another AMD library), get the script in whatever way you prefer and require the tech as you normally would:

require(['video.js', 'videojs-flash'], function(videojs) {
  var player = videojs('my-video');
});

Force Flash playback

By default techs are used in the order in which they are registered. This means that the HTML5 tech that is buildin to video.js is going to be registered first and thus prioritized. To change this you will have to change the techOrder option on video.js. See examples below

NOTE: video.js and flash are already included in these example

Prioritize the flash tech over the HTML5 tech, but fallback to the HTML5 tech if the Flash tech does not work.

videojs('some-video-id', {techOrder: ['flash', 'html5']});

If you don't want to fallback to the HTML5 and only want to use the Flash tech you can do this:

videojs('some-video-id', {techOrder: ['flash']});

See the video.js docs for additional information and other ways to set options in video.js See the video.js docs for additional information on the techOrder option.

License

Apache-2.0. Copyright (c) Brightcove, Inc.