Closed (won't fix)
Project:
Media: YouTube
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Jun 2012 at 14:25 UTC
Updated:
17 May 2016 at 11:21 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
opdaviesComment #2
RobW commentedWhy not use the iframe and let Youtube decide if HTML5 is needed or not?
Comment #3
opdaviesSorry, I'm not sure that I understand your reply. What do you mean by "Why not use the iframe"?
Comment #4
RobW commentedYou're already using the iframe, which detects HTML5 or flash capability and chooses the best experience for the browser/device it can. The iframe by itself uses html5 player on devices without flash. The html5 param changes the behavior from:
With flash but no HTML5 = use flash
With HTML5 but no flash = use HTML5
With flash and HTML5 = use flash
to
With flash but no HTML5 = use flash
With HTML5 but no flash = use HTML5
With flash and HTML5 = use HTML5
(http://stackoverflow.com/questions/5845484/force-html5-youtube-video)
I'm guessing this is because the html5 player is less tested, and maybe doesn't have pop up adverts (at least I think I remember hearing that somewhere). In the future, I would bet that the
html5=1behavior will become default.So the "can this device use html5" test in Media: Youtube (which I'm trying to remove, btw) is just doing the same thing twice. Instead of using the test to load the param, adding a configuration option in the module, something like "Force HTML5 player when available", would probably be a better choice.
Also worth considering is the html5 parameter isn't a documented or officially supported player parameter -- it's not listed in https://developers.google.com/youtube/player_parameters. Should we add a developer parameter that could change or disappear to M:YT options? I could go either way.
Comment #5
bneil commentedI support this idea. We've been testing the YouTube HTML5 player and it's much more keyboard accessible than using the Flash version, so we'd like to be able to force all videos to use the HTML5 version first.
I believe a colleague of mine is working on a patch for 7.x-2.x to add that configuration option. Should we change this into a feature request against the 7.x-2.x version or create a new issue?
Comment #6
RobW commentedWorks for me.
Comment #7
briand44 commentedHere is a patch that adds the configuration option "Force HTML5 player when available". If adding videos through the wysiwyg you have to edit and save the node before the video will be displayed using the HTML5 version.
Comment #8
bneil commentedThe patch works for me as advertised.
Comment #9
bneil commentedUpdating issue title.
Comment #10
RobW commentedWorking for me as well. Anyone else testing? I'd like to mark this as RTBC.
Comment #11
RobW commentedI rerolled the patch against latest dev and made some minor edits. But now when testing (this patch and the one in #7 against earlier dev) the parameter simply does nothing. I tried all sorts of combinations, order of queries, different protocols, and Youtube always loaded the flash player in my (Chrome) browser.
Recent comments on the S.O. thread report mixed or no success with the param. I am going to postpone this until YT documents the parameter or we can consistently reproduce success.
Patch attached for posterity.
Comment #12
stefan.r commentedPatch against latest dev.
This works for me in Firefox, whether in HTML5 beta or not. Can anyone else test?
For a keyboard accessible version of a Youtube video, forcing HTML5 video seems to be the best option at this point, so even if this is not working on 100% of browsers and 100% of videos, I still think this option should be added as it seems to work in the majority of cases now. For those other cases, users could always add a disclaimer such as "For a fully keyboard-accessible alternative to this video, view it in Chrome or on any Android or iOS device, view it in Firefox with the YouTube ALL HTML5 add-on installed, or disable Flash in Internet Explorer".
Stackexchange thread for reference:
http://stackoverflow.com/questions/5845484/force-html5-youtube-video
Comment #13
stefan.r commentedComment #14
stefan.r commentedPlease can anyone review this so we can get this committed? Thanks!
Comment #15
oivind commentedInstalled patch #12 on 7.x-2.0-rc5. It does not work in latest Firefox.
If I understand this correctly, this patch should do more or less the same as when selecting the "Request the HTML5 player" button on https://www.youtube.com/html5. If I press this button the HTML5 player will be used in the iframe.
Comment #16
oivind commentedOK, it finally works. It turned out that I didn't have the right settings in admin/structure/file-types/manage/video/file-display. I also had to modify my view.
Comment #17
stefan.r commentedShould not be needed anymore:
http://youtube-eng.blogspot.com2015/01/youtube-now-defaults-to-html5_27....