Closed Bug 980833 Opened 11 years ago Closed 9 years ago

Latest YouTube API defaults to Flash player in Firefox even when html5=1 is used

Categories

(Web Compatibility :: Site Reports, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: valera.rozuvan, Assigned: karlcow)

References

Details

(Whiteboard: [serversniff][country-all][sitewait])

User Agent: Mozilla/5.0 (X11; Linux i686; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release) Build ID: 20140127194636 Steps to reproduce: Create a web page that load YouTube API, and requests a video in HTML5 player mode. Sample code can be found at http://jsfiddle.net/4hVWv/3/ . Specifically request HTML5 mode by setting html5=1. Actual results: The YouTube API will load the Flash player. Expected results: If you go to http://www.youtube.com/html5 and request for the HTML5 trial, only then will the player on the page load in HTML5 mode. This was not so until recently. The setting html5=1 completely disregarded the setting on the http://www.youtube.com/html5 page. If you try viewing the page with Google Chrome, this will not be an issue.
> This was not so until recently. I see flash load in the fiddle with Firefox 23. Did Google change something server-side, perhaps?
Flags: needinfo?(valera.rozuvan)
Testing old versions some more, Firefox nightlies from 2013-04-01 or earlier do show the HTML5 player, the ones starting 2013-04-02 do not. Checkin range: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=0b7c27024048&tochange=aae004a3c5d9 The main thing of interest that happened in that range and might affect video is a version bump from "22" to "23". And indeed, if I load the fiddle in Firefox 27 I get flash. If I load it in Firefox 27 whose UA string has been set to that of Firefox 22, I get HTML5 video. Sounds like broken UA sniffing...
Assignee: nobody → english-us
Component: General → English US
Product: Core → Tech Evangelism
Version: 27 Branch → Trunk
Karl, do we have contacts for this sort of thing other than the generic mailing list?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(kdubost)
It seems there are a few instances of User Agent detection in the JavaScript. I confirmed that changing the version number helps to get the right version. I haven't figured out if it's server side or client side (JS). The interpreted fiddle page is at: http://fiddle.jshell.net/4hVWv/3/show/ With Firefox OS 18 UA, I receive the HTML5 player which is inside an iframe. With Firefox OS 26 UA, I receive the Flash player. The API code seems to be http://s.ytimg.com/yts/jsbin/www-widgetapi-vfl9twtxR.js If we could locate where the issue happens, it will be easier to convince YouTube devs to fix it. I'm putting Mike to see if he has better luck than me at finding the issue. I have the feeling there is a table/array of which versions should get what, but not sure.
Flags: needinfo?(kdubost) → needinfo?(miket)
Assignee: english-us → nobody
Component: English US → Desktop
Nothing is happening on the clientside, AFAICT. Just like Boris said, it seems to be "22" vs "23", somewhere on the serverside. Depending on your UA string, Youtube will send back an HTML file with either the Flash player bootstrap code, or an HTML5 video player (+bootstrap code): $ http --print=Hb 'https://www.youtube.com/embed/M7lc1UVf-VE?start=60&end=90&html5=1&wmode=transparent&rel=0&showinfo=0&enablejsapi=1&modestbranding=1&origin=http%3A%2F%2Ffiddle.jshell.net' User-Agent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:23.0) Gecko/20100101 Firefox/23.0" | grep \"html5\": [snip]..."html5": false...[snip] $ http --print=Hb 'https://www.youtube.com/embed/M7lc1UVf-VE?start=60&end=90&html5=1&wmode=transparent&rel=0&showinfo=0&enablejsapi=1&modestbranding=1&origin=http%3A%2F%2Ffiddle.jshell.net' User-Agent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:22.0) Gecko/20100101 Firefox/22.0" | grep \"html5\": [snip]..."html5": true...[snip]
Whiteboard: [serversniff][country-all][contactready]
I contacted Alex.
Assignee: nobody → kdubost
Whiteboard: [serversniff][country-all][contactready] → [serversniff][country-all][sitewait]
From a YouTube PM > Thanks for the report. The reason we fall back to Flash here is > that 23+ blocks passive mixed content and we can't yet guarantee > that HTTPS embeds will never get mixed content. The Flash player > is a lot more forgiving on this front. However, we are actively > working on getting rid of mixed content on embeds for all users, > so we'll try to tighten up the player selection logic a bit in > this case. > > It's also worth noting that the HTML5 player isn't widely > launched in Firefox since it hasn't fully implemented MSE. The > html5=1 parameter provides a hint that the embedder wants to use > the HTML5 player but we can't promise that it's what we'll load. So I guess we have additional dependencies before solving this.
WFM in current Nightly with MSE enabled.
\o/ Thanks sjw. Let's wait that MSE is out of beta and released to close the bug.
This is fixed now (for a long time).
Flags: needinfo?(valera.rozuvan)
So..no reason to keep this open, right?
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.