Although the
WMediaPlayer
implements a cross-browser video player, in some cases, one may
want direct access to a native HTML <video>
element. This is provided by the WVideo widget.
The trailer used in the examples below
is Sintel, (c) copyright Blender Foundation |
durian.blender.org
Native video
Below is the video class, with a WImage (a static JPEG
image) as fallback. The video will play on browsers that support
MP4 or OGV video streams (firefox, chrome, safari, ...)
natively (using HTML <video>), and show the image on other
browsers (Internet Explorer, opera, ...).
Native video with Flash player fall-back
For browsers that support HTML <video>, this
video below looks exactly like the one above. On other browsers,
the player below falls back to a Flash player, which plays an
MP4 video. If flash is not supported on your system, a static
image is shown.
The Flash-based video player can be any player. The example
below uses FLV
Player as fallback for HTML5 video, but any flash player can
do the job.
Flash-player video
Of course, you may also opt to simply rely on Flash to play the
video. Below we use the YouTube flash player.