HTML5 player: Difference between revisions
Line 186: | Line 186: | ||
'''Cons:''' | '''Cons:''' | ||
* RTMP requires non-standard MIME. | * RTMP requires non-standard MIME. | ||
* Android and iOS override Video.JS with own player, when not overridden, content is not | * Android and iOS override Video.JS with own player, when not overridden, content is not playing. | ||
* No RTL. | * No RTL. | ||
* HLS support via plugin (many files to include, external contributor see https://github.com/videojs/videojs-contrib-hls). | * HLS support via plugin (many files to include, external contributor see https://github.com/videojs/videojs-contrib-hls). |
Revision as of 10:43, 7 March 2014
Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.
HTML5 Player with flash fallback | |
---|---|
Project state | In Development |
Tracker issue | https://tracker.moodle.org/browse/MDL-38158 |
Discussion | https://moodle.org/mod/forum/discuss.php?d=222753#p1105373 |
Assignee | Ruslan Kabalin |
Project goals
The purpose of this document is to choose HTML5 with flash fallback for integration in Moodle.
The aim of this change is to reach a consistent look of the player among different platforms and browsers, as well as making sure that player starts using flash if html5 is not supported by browser for the given format. Another aim is to improve accessibility and usability, enhance customisation.
Considerations
- Usability of the player - is it easy to use it and intuitively understand how to use controls?
- Accessibility of the player - possibility of keyboard navigation, subtitles, support?
- Appearance of the player - can its interface be modified, themes support, RTL?
- Consistency among browsers - does player look the same?
- Audio support - can player handle HTML5 <audio> tag?
- Mobile platforms support - does player also work on iOS and Android?
- Streaming media support (including adaptive-bitrate delivery) - can player handle RTMP, Apple HLS, Adobe HDS, Microsoft HSS?
- Plugins support - can we use or develop community plugins easily?
- Embedding support - so users could post media content outside Moodle, if permitted.
- Maintainability of the links between the player and Moodle - how much work will we need to do every time we upgrade?
Candidates
- Flowplayer HTML5
- Video.JS
- Projekktor
- ?Are there other alternatives?
Flowplayer HTML5 | Video.JS | Projekktor | |
---|---|---|---|
Accessible Player: | |||
|
Yes | No | Yes (configurable) |
|
Yes | Yes | Yes (via plugin) |
|
Yes | Yes | Yes |
Appearance: | |||
|
Yes (via CSS) | Yes (via CSS) | Yes (via CSS) |
|
Yes | Yes | Yes |
|
Yes | No | No |
Mobile platforms: | |||
|
Yes | No | Yes |
|
Yes | No | Yes |
Streaming protocols: | |||
|
Yes | Yes | Yes (via playlist) |
|
HLS | HLS (via plugin) | HLS (via playlist) |
Audio player | No | Yes | Yes |
Embedding support | Yes (configurable) | Yes (via addThis plugin) | Yes (via plugin) |
License | GPL v3 (with additional terms) | Apache 2 | GPL v3 |
JS library | jQuery | - | jQuery |
Plugins infrastructure | No | Yes | Yes |
Flash fallback player | Flowplayer Flash | video-js flash | StobeMediaPlayback (but can be jarisplayer or some other). |
API | Yes (plus window.flowplayer object) | Yes | Yes |
Flowplayer HTML5
Pros:
- Good looking player, resembles existing flash flowplayer in Moodle (with "functional" skin)
- Extensive customisation (via CSS3 skins and configuration object)
- Streaming support (RTMP, HLS)
- Good accessibility features
- Configurable embedding functionality
- Existing flash flowplayer can be configured for fallback (the appearance of player will not be affected).
Cons:
- Require jQuery for functioning
- Flowplayer logo remains on screen
Technical notes (lessons learned from the prototypes)
- Player initialisation is done using wrapper around <video>.
- width and height attributes in video tag are ignored, player size is configured via wrapper size only.
- RTMP server connection is configured via data-rtmp attribute in wrapper or player init config parameter, actual path the file specified in src attribute of source item.
- <source type="video/flash"... dummy MIME type to force using plash player for whatever content.
Missing features
- Plugins infrastructure
- No audio support
Video.JS
Pros:
- No logo on screen.
- Extensive API.
- No extra JS library needed.
- Many plugins.
Cons:
- RTMP requires non-standard MIME.
- Android and iOS override Video.JS with own player, when not overridden, content is not playing.
- No RTL.
- HLS support via plugin (many files to include, external contributor see https://github.com/videojs/videojs-contrib-hls).
Technical notes (lessons learned from the prototypes)
- Player initialisation is done using <video> tag directly (no wrapper needed).
- RTMP server connection and path specified as single URI in src attribute of source item, '&' character is used as server connection and path divider.
Missing features
- Embedded HLS support.
Projekktor
Pros:
- No logo on screen.
- Good API, well documented.
- Respect HTML5 video/audio attributes.
- Media RSS support.
- Choice of flash player for fallback, those included by default are StrobeMediaPlayback and Jarisplayer, both Open Source.
- Platform preference order selection (e.g. browser, ios, android, flash, native).
Cons:
- Uses flash where it is not supposed to.
- Issues on ios (suggests to download file when play button is pressed).
- RTMP only work if defined via playlist rather than <source> tags.
- Subtitles plugin is not free.
Technical notes (lessons learned from the prototypes)
- Player initialisation is done using <video> tag directly (no wrapper needed).
Missing features
Cross-browser support checks
Method
Compatibility checks were done manually by accessing the sample page using different browsers and platforms. Sample page contained the list of identical player instances, initialised for each <video> definition with a <source> of particular format: mp4, webm, ogg, flv. Streaming support was checked by setting up a <video> container with two sources of the same video, one was HLS (Apple HTTP Live Streaming) stream for browsers and platforms that support html5 video streaming, another one was RTMP which is played using flash engine and supposed to be used in case if HLS is not supported.
Sample Pages
- Flowplayer HTML5 version 5.4.6.
- Video.JS version 4.4.1.
- Projekktor version 1.3.09.
Results
Browser | mp4 | webm | ogg | flv | RTMP/HLS* |
---|---|---|---|---|---|
Windows 7 | |||||
|
html5 | html5 | html5 | flash | flash |
|
html5 | html5 | html5 | flash | flash |
|
flash | html5 | - | flash | flash |
|
flash | - | - | flash | flash |
|
html5 | - | - | flash | flash |
Linux (Debian Wheezy) | |||||
|
html5 | html5 | html5 | flash | flash |
OSX 10.9 | |||||
|
html5 | - | - | flash | html5 |
|
html5 | html5 | html5 | flash | flash |
Android 4.2.2 phone (CyanogenMod, no flash) | |||||
|
html5 | html5 | - | - | - |
|
html5 | html5 | - | - | html5 |
Android 4.2.2 tablet (GalaxyTab2, flash app 11.1.115.36) | |||||
|
html5 | html5 | - | - | - |
|
html5 | html5 | - | flash | html5 |
|
html5 | html5 | - | - | - |
iPhone 4S (6.1.3) | |||||
|
html5 | - | - | - | html5 |
iPad 4 (7.0.6) | |||||
|
html5 | - | - | - | html5 |
* For HLS/RTMP, html5 in the table means HLS has been used, flash means player fell back and used RTMP.