Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I play a .swf file using video.js?

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">
like image 738
Pankaj Avatar asked Apr 30 '13 07:04

Pankaj


People also ask

How do I open SWF files without Flash Player?

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 SWF video format?

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.

Can VLC player play SWF files?

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.


1 Answers

video.js is an HTML5 video player.
However, the HTML5 <video> tag currently only supports a limited number of formats:

  • WebM
  • Ogg Theora Vorbis
  • Ogg Opus
  • MP4 H.264
  • MP3
  • WAVE PCM

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

like image 116
Mr. Llama Avatar answered Oct 05 '22 10:10

Mr. Llama