Closed simevidas closed 9 years ago
Hmm. I'm not able to reproduce this error on Firefox Android version 29.
@adamopenweb What? Could it really be just my phone then? I have an Sony Xperia S for over 2 years now and, as far as I remember, I've never been able to play YouTube videos in Firefox. I'll have to ask around to check if there are others with the same issue.
Yeah, that's interesting @simevidas. No issues with m.youtube.com here:
Do you happen to have adb installed (likely via the Android sdk)? It would be interesting to see the output of adb logcat | grep Gecko
when you try to play a video.
@miketaylr That screenshot is exactly how the YouTube Android app looks on my phone. Are you sure that's still in Firefox? I'm asking because on my phone:
On the other hand, Chrome always plays the video with its own video player (even if the app is installed).
I don't know. This sounds like a limitation specific to my device. Each device maker customizes the OS, so maybe Sony screwed up. If you don't have other clues, I'd close this issue.
When clicking "Play" on m.youtube.com in Firefox, the app plays the video, not Firefox's video player
@simevidas yes, me too. I have a Google Nexus 7 with the last version of Android 4.4.3.
On the other hand, Chrome always plays the video with its own video player (even if the app is installed)
Same thing.
Maybe reset your installation ? Which version of Android you have ? And Youtube ?
@magsout Sony Xperia S w/ Android 4.1.2. I've re-installed the YouTube app and even disabled/enabled it and I still get the same behavior. I may try to factory-reset my device once I by a new Android.
@simevidas Actually I'm able to reproduce the bug. If I disabled Youtube App and launch m.youtube.com on Firefox, I have black screen and nothing happened.
Honestly, I don't know if it's a bug or if Firefox need Youtube App to work.
@miketaylr @karlcow , what dou you think about it ?
@simevidas So I have something similar I think on the GT-i9100 with CyanodgenMod I do not have the youtube app.
The screen fades away and becomes black. Then nothing happens.
@magsout puts me on the right track on IRC. Simple question sometimes.
This is the code for the video in m.youtube.com
<div class="_mce" id="koya_elem_14_1">
<a href="#" class="_mdr" onclick="return koya.onEvent(arguments[0]||window.event,'14_2')">
<div class="_mer" style="background-image:url(http://i.ytimg.com/vi/9Sv29tHv57c/hqdefault.jpg?w=320&h=192&sigh=yFmTJ8chi7FBIyDhq0TdOxy_ZvI);">
<div id="koya_elem_14_3">
<div class="_mfr">
<div class="_mor" id="koya_elem_14_4">
<div class="_mpr"></div>
</div>
</div>
</div>
</div>
</a>
</div>
I can emulate Firefox for Android UA on Desktop and navigate to m.youtube.com. When clicking on a video page, it fails too. The address bar contains
vnd.youtube:9Sv29tHv57c?vndapp=youtube_mobile&vndclient=mv-google&vndel=watch&vnddnc=1
So it's indeed trying to launch an app for YouTube.
Let's push this a bit further. Now emulating Firefox OS UA, I receive the same markup but when I click, the DOM is populated with a new element:
<video controls="" title="バイトル「AKBスペシャルライブ告知」篇" src="http://r5---sn-uxjoxu-ioql.googlevideo.com/videoplayback?fexp=927625%2C930008%2C931330%2C934030%2C937429%2C938645&mws=yes&signature=3BE3AE5FF1A2E921864EA4C90581D85074AD04CB.B2FEC6D3D9A2398A96C7A4F3C053C158330B5C4B&sparams=id%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&ipbits=0&ratebypass=yes&ip=42.145.168.181&key=yt5&dnc=1&ms=au&mv=m&source=youtube&expire=1403618400&sver=3&app=youtube_mobile&itag=36&el=watch&mt=1403595354&upn=_YoMmiSTiik&id=o-APvCH301snl-cc2HldvvAJqAS_rQu7MMbWjecvtCIq1t&yms=hi_JGjhhxlY&cpn=SjLMUj3kj5rf1mBE" class="_mwc _mwd _mxd" id="player_9Sv29tHv57c" poster="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="></video>
Thanks @karlcow for the analysis.
This is not really a bug, it's Android that sniff. But there is not fallback when Youtube App is disabled.
@karlcow , hey, how do you emulate the Firefox OS UA exactly? When I use Firefox OS Simulator, I still get the vnd.youtube protocol which tries you to send you to the Youtube App.
@mwargers using something like User Agent Switcher
Duplicate in https://bugzilla.mozilla.org/show_bug.cgi?id=1073220
@kalrcow, I did use the User Agent Switcher. That didn't help. The issue is that Youtube somehow can make a difference between FirefoxOS on the desktop and FirefoxOS on the device and I don't know what the cause of that is: https://bugzilla.mozilla.org/show_bug.cgi?id=877594
@mwargers it's common some libraries will test for example if touch events exist or the viewport (a mobile device will resize the site to the width of the screen, not the desktop).
I wonder if this bug is a duplicate of this one which was fixed already. https://bugzilla.mozilla.org/show_bug.cgi?id=984301
@simevidas do you still have the issue?
@karlcow I’ve tested on my new Android device (Nexus 7 running Android 4.4.4). By default, YouTube videos are directed to the YouTube app. After disabling the app (twice, i.e. both the updated (downloaded) app and the built-in YouTube app which is part of the Android image), the mobile YouTube site will display a video player and videos play normally.
Side note: When playing a YouTube video in Firefox, I’ve encountered a minor bug with not being able to toggle play/pause correctly when tapping on the video. See here. I guess, YouTube’s JavaScript tap event handlers are not optimized for Firefox’s implementation, which could be part of the reason why YouTube decided to relegate video playback to the app instead.
@simevidas Thanks a lot! Let's say this one has been fixed.
For the JS, if it's reproducible. Better to open a new bug where we could investigate.
URL: http://m.youtube.com Browser: Firefox for Android Version: 28 Problem type: Looks like the website has a bug. Site owner: No
Steps to Reproduce None of the videos on YouTube's mobile site plays in Firefox Android. I just see a black screen. I'm forced to switch to Chrome/Opera whenever I want to watch YouTube on my phone :-(