videojs的flash和html5,videojs-flash「终于解决」

videojs的flash和html5,videojs-flash「终于解决」TheofficialFlashtechpackageforVideo.js.videojs-flashTheofficialflashtechforthevideojsplayer.NOTE:ThisshouldonlybeusedwithVideo.js>=6.0.0astheflashtechisbuildintoversio…

大家好,欢迎来到IT知识分享网。

The official Flash tech package for Video.js.

videojs-flash

videojs-flash.svg?branch=master

videojs-flash.svg

badge.svg

11cc0c0d6eb49d9ec4788e3bd6510d47.png

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:

Adding the Flash Tech to video.js

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

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.

var player = videojs(‘my-video’);

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.

HomePage

Repository

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/25005.html

(0)
上一篇 2023-08-03 10:33
下一篇 2023-08-05 21:33

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

关注微信