My video uploads are transcoded to flv, mp4, ogg and webm.
In theme_video_formatter_player the formatter uses the extension of the first file ($item['playablefiles'][0]->uri) to determine whether to use video_play_flv or video_play_html5.
Since the first of the 4 files is always the flv, I only get the flash player (Flowplayer in my case) and never the html5 player.
Of course when I change the player for flv files to html5 (video for everybody) then the html5 theme function is always used and there is never a flash player.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | video-player_selection-1889202-2.patch | 1.58 KB | JvE |
Comments
Comment #1
Jorrit commentedWhat is your preferred HTML5 player?
Comment #2
JvE commentedVideo for everybody. Videojs throws an error in chrome and only plays 1 second in IE7, so changing the player for FLV to HTML5 and choosing Videojs is not a viable workaround for me.
Attached patch allows me to choose a flash player for FLV and HTML5 for the other videos.
It basically changes the way the theme function is picked:
- If one of the video types is configured to use an HTML5 player then the HTML5 theme function is used.
- If the last or only video type is configured to use an FLV player then the FLV theme function is used.
- In all other cases the player configured for the last or only video type is used.
A more solid approach for the future might be to allow the priority of the players to be configurable.
Comment #3
Jorrit commentedYour patch looks good, I will commit it next week when I have more time.
Comment #4
Jorrit commentedCommitted, thanks.