Closed Bug 966860 Opened 8 years ago Closed 5 years ago

hulu.com does not play video in Firefox on Android or Firefox OS

Categories

(Web Compatibility :: Mobile, defect)

ARM
Android
defect
Not set
normal

Tracking

(platform-rel ?)

RESOLVED INVALID
Tracking Status
platform-rel --- ?

People

(Reporter: hsteen, Assigned: adamopenweb)

References

()

Details

(Whiteboard: [mobile-compat-form][country-us][clientsniff][sitewait][video][platform-rel-Hulu])

Attachments

(1 file)

Site: http://hulu.com
hulu.com does not play video in Firefox on Android or Firefox OS

:: Steps To Reproduce

When trying to play videos on Hulu.com (and play videos that are embedded from Hulu on other sites), I just get a black square. This is caused by browser/platform/version sniffing here:

http://www.hulu.com/site-player/html5/js/app_embed.js (for videos embedded elsewhere)
http://www.hulu.com/site-player/html5/js/app_v2.js (on-site)

        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;
            
        };
        AppHelper.isSupportedAndroidVerision = function() {
            var major, matches, minor;
             try {
                matches = Constants.ANDROID_VERSION_REGEX.exec(navigator.userAgent);
                 if (matches.length === 3) {
                    major = parseInt(matches[1]);
                    minor = parseInt(matches[2]);
                     if ((major >= Constants.ANDROID_MIN_MAJOR_VERSION && minor >= Constants.ANDROID_MIN_MINOR_VERSION) || major >= (Constants.ANDROID_MIN_MAJOR_VERSION + 1)) {
                        return true;
                        
                    }
                    else {
                        return false;
                        
                    }
                }
                else {
                    return false;
                    
                }
            }
            catch (e) {
                return false;
                
            }
        };
        AppHelper.isAndroidVersion2 = function() {
            var majorVersion, matches;
             try {
                matches = Constants.ANDROID_VERSION_REGEX.exec(navigator.userAgent);
                 if (matches.length === 3) {
                    majorVersion = parseInt(matches[1]);
                    return majorVersion === 2;
                    
                }
                return false;
                
            }
            catch (e) {
                return false;
                
            }
        };

In Firefox for Android, simply making the isSupportedAndroidVerision() method return true fixes the problem. Firefox OS may need some more fixing since it doesn't have "Android" in UA string.

:: Expected Result

video

:: Actual Result

no video

:: Additional Information

Software Version: 1.1
Reporter's User Agent: Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0
Embedded Hulu videos can be tested for example on ovguide.com
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [mobile-compat-form] → [mobile-compat-form][country-us][clientsniff][contactready][video]
still an issue :(
See Also: → 940325
Reached out again to Hulu as noted in bug #940325.
Assignee: nobody → astevenson
Status: NEW → ASSIGNED
Whiteboard: [mobile-compat-form][country-us][clientsniff][contactready][video] → [mobile-compat-form][country-us][clientsniff][sitewait][video]
In accordance to https://groups.google.com/d/msg/mozilla.compatibility/OHsR590ExWs/W3ohc41tFAAJ
Requalifying the bug, the issue is happening on Firefox Android too.
OS: Gonk (Firefox OS) → Android
Hardware: Other → ARM
platform-rel: --- → ?
Whiteboard: [mobile-compat-form][country-us][clientsniff][sitewait][video] → [mobile-compat-form][country-us][clientsniff][sitewait][video][platform-rel-Hulu]
ni? to see if still repros.
Flags: needinfo?(miket)
Attached image Fennec / Chrome
Seems like Hulu requires an app to watch any video these days (...and an account, yay for free trials).
Flags: needinfo?(miket)
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.