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.

CommentFileSizeAuthor
#2 video-player_selection-1889202-2.patch1.58 KBJvE
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jorrit’s picture

What is your preferred HTML5 player?

JvE’s picture

Status: Active » Needs review
FileSize
1.58 KB

Video 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.

Jorrit’s picture

Status: Needs review » Reviewed & tested by the community

Your patch looks good, I will commit it next week when I have more time.

Jorrit’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.