How do I play a .SWF
file using the video.js
player?
I've played around with the code below, but I can not get it to work.
When I open the .swf
file directly (using open with IE), I then I am able to play the .swf
file that way.
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"
};
HTML:
<video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="400" height="300">
Open an SWF file without Adobe Flash Player. The program is called Flash Player Projector Content Debugger, and there are versions for Windows, Mac and Linux. The Windows version of the debugger is an executable EXE file that is about 16 MB in size. No installation is required.
What is a SWF File? SWF file is an Adobe flash file format which contains videos and vector based animations. The full abbreviation of SWF is Small Web Format but sometimes it is referred as ShockWave Format. This file format was created by macromedia and now is owned by Adobe.
VLC Media Player is a free, open-source video player that also supports other media, and it's particularly good when it comes to playing less commonly found formats. If you're looking for an SWF player – a media player that supports Shockwave Flash files – then VLC is one of the best programs you can use.
video.js
is an HTML5 video player.
However, the HTML5 <video>
tag currently only supports a limited number of formats:
Some browsers may support a few additional formats, but that's implementation specific.
Please note that Adobe Flash swf
files are not included in that list as they cannot be played with <video>
tags, only <embed>
tags.
However, there are a few community created extensions that may accomplish what you're looking for: https://github.com/videojs/video-js-swf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With