Closed Bug 940325 Opened 6 years ago Closed 5 years ago Firefox OS gets desktop version


(Web Compatibility :: Mobile, defect)

Gonk (Firefox OS)
Not set


(Not tracked)



(Reporter: hsteen, Assigned: adamopenweb)




(Whiteboard: [mobile-compat-form][clientsniff][sitewait])


(1 file)

Site: Firefox OS gets desktop version

:: Steps To Reproduce

Reason is probably here:

        if(true && /(ipad|itouch|ipod|iphone|Android|Windows Phone|GoogleTV|Boxee|Skyfire|Playbook|Blackberry|Silk|BNTV250|Xbox One|Xbox|PLAYSTATION 3|Nintendo WiiU)/i.test(navigator.userAgent)) {
          //currently mobile secure page doesn't need player.js
            d.write("\n              <script src=\"/site-player/html5/js/app_v2.js\" type=\"text/javascript\"><\/script>\n            ");

Can not test if the video works, since I'm outside of the US.

:: Expected Result


:: Actual Result

no video

:: Additional Information

Software Version: 1.1
Reporter's User Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3
Ever confirmed: true
Whiteboard: [mobile-compat-form] → [mobile-compat-form][clientsniff][contactready]
On Firefox OS 1.1/ ZTE device

So after the message for USA only disappear, we acccess to the desktop site. 
On the desktop site, when clicking on a video, we get "Hulu requires Flash Player or higher." Which is non starter for Firefox OS.

On Firefox for Android (Firefox 23/Android 2.3.5). I get the mobile site. I can click around. When clicking a video on the trending topic, I get a blacksquare but no video starting. No error message.

Mike could you test in USA?
Flags: needinfo?(miket)
I think we're dealing with larger issues than just that first little doc.write which adds the app_v2.js script. Inside of that... (posted to

You need to be whitelisted to get the player: 

 AppHelper.isPlayerAllowed = function() {
   var android_devices, android_devices_regex, can_play_codec, enableAndroid, ios_devices, ios_devices_regex, remaining_devices, remaining_devices_regex;
   ios_devices = ["ipad", "itouch", "ipod", "iphone"].join("|");
   ios_devices_regex = RegExp("(" + ios_devices + ")", 'i');
   android_devices = ["Android.*Mobile", "Android"].join("|");
   android_devices_regex = RegExp("(" + android_devices + ")", 'i');
   enableAndroid = android_devices_regex.test(navigator.userAgent) && AppHelper.isSupportedAndroidVerision();
   remaining_devices = ["Silk\/2", "Silk\/3", "Xbox"].join("|");
   remaining_devices_regex = RegExp("(" + remaining_devices + ")", 'i');
   can_play_codec = $('.video-player').length > 0 && $('.video-player')[0].canPlayType && ($('.video-player')[0].canPlayType('video/mp4; codecs="avc1.42E00D, avc1.640015, avc1.64001E"') !== 'no');
   return ios_devices_regex.test(navigator.userAgent) || remaining_devices_regex.test(navigator.userAgent) || enableAndroid || !Constants.PRODUCTION;

Obviously none of that will work for FirefoxOS, and likely the reason why it fails in Firefox for Android is due to AppHelper.isSupportedAndroidVerision(),

There's no way to get Android version information out of the Firefox for Android UA string (cf. Constants.ANDROID_VERSION_REGEX = /Android\s(\d{1})\.(\d{1}).*;/i;)
Just noticed the "can_play_codec = $('.video-player').length > 0 && $('.video-player')[0].canPlayType && ($('.video-player')[0].canPlayType('video/mp4; codecs="avc1.42E00D, avc1.640015, avc1.64001E"') !== 'no');" which would require some extra UA sniffing to work around FxOS 1.0's naughty bug that claims to support h264 (fixed in 1.1).

And some further testing on F4A:

If I force enableAndroid to be true it gets close to working on Firefox for Android (nightly, because that's the one configured to use my proxy)... but clicking on the videos results in some audio for about 3 or 4 seconds before a stutter in the audio which leads to a hard browser crash. 

I'll attach the logcat output from when I refresh the page until it crashes.

F/libc    ( 5346): Fatal signal 11 (SIGSEGV) at 0x000014e2 (code=-6), thread 5619 (Compositor)
E/OMXNodeInstance(  245): !!! Observer died. Quickly, do something, ... anything...
I/WindowState(  599): WIN DEATH: Window{42b7ff98 u0 org.mozilla.fennec/org.mozilla.fennec.App}

Aaron, does that look familiar to you?
Attached file logcat.txt
One more thing to point out to their devs:
AppHelper.isFullScreen = function() {
  return document.fullScreenElement || document.mozFullScreen || document.webkitIsFullScreen || $('video').get(0).webkitDisplayingFullscreen;

s/document.fullScreenElement/document.fullscreenElement/ (lowercase S)
Contact starting with Twitter, seem to response pretty fast.
Assignee: nobody → astevenson
Whiteboard: [mobile-compat-form][clientsniff][contactready] → [mobile-compat-form][clientsniff][sitewait]
Twitter response: Hey there, thanks for the tweet. We've notified our devs of this open bug. We'll reach out if we have any insight.
The site redirects to now. Which is a mobile site but not the same experience as Chrome / Firefox Android.
Reaching out to contacts found at the Tech Blog page I also referenced bug #966860.
See Also: → 966860
Hey Adam,
No problem at all, I've forwarded the email to a few people who might know which team is responsible for those issues. Thanks for reporting!
We receive a mobile version.
Thanks Adam
Closed: 5 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.