如何.SWF使用video.js播放器播放文件?
我玩过下面的代码,但是我无法让它工作.
当我.swf直接打开文件(使用IE打开)时,我能够以.swf这种方式播放文件.
JavaScript的:
// path to location of swf-file
_V_.options.flash.swf = "video-js.swf";
// flashvars
_V_.options.flash.flashVars = {
file: "./ExportSWF/Recording.swf", //file to be played
autostart: "false",
provider: "http",
"http.startparam": "start"
};
// object params
_V_.options.flash.params = {
allowfullscreen: "true",
wmode: "transparent",
allowscriptaccess: "always"
};
Run Code Online (Sandbox Code Playgroud)
HTML:
<video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="400" height="300">
Run Code Online (Sandbox Code Playgroud)