Closed Bug 1125892 Opened 9 years ago Closed 8 years ago

Wall Street Journal video player does not properly detect HTML5 video

Categories

(Web Compatibility :: Site Reports, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sawrubh, Unassigned)

References

()

Details

(Whiteboard: [country-us] [video] [js] [contactready])

STR:
* On my Nexus 5 (5.0.1) I open http://www.wsj.com/articles/obamas-appearance-at-indias-republic-day-sends-message-to-china-1422245039 in my Nightly.

What happens:
The website says 'Your browser doesn't support HTML5 Video Playback'. The video works perfectly in Chrome on the same device.
Direct video: http://video-api.wsj.com/api-video/player/iframe.html?guid=736D7272-6271-4A4B-AC04-E9CB0B652C3E

WSJVideo.js: http://video-api.wsj.com/api-video/player/js/wsjvideo.js

On quick look it looks like a failure in the initHTML5() function, could be related to their UA parsing
Component: General → Mobile
OS: Windows 7 → Android
Product: Firefox for Android → Tech Evangelism
Hardware: x86 → ARM
Summary: Website saying HTML5 Video Playback isn't supported in Nightly → Wall Street Journal video player does not properly detect HTML5 video
var ua = navigator.userAgent.toLowerCase();
var is_firefox = navigator.userAgent.toLowerCase().indexOf('firefox') > - 1;
var isIpad = ua.match(/(ipad|iphone|ipod)/i);
var isAndroid = ua.match(/(android)/i);
var canPlay = false;
if (isIpad || (ua.match(/(android)/i) && parseFloat(ua.slice(ua.indexOf('android') + 8)) >= 4)) {
    settings.disableHtmlControls = true;
    canPlay = true;
   }


Here this line of code with the parseFloat which is looking for an Android version number:

09:27:21.454 ua
09:27:21.457 "mozilla/5.0 (android; mobile; rv:36.0) gecko/36.0 firefox/36.0"
09:25:18.159 ua.indexOf('android')
09:25:18.161 13
09:25:36.906 ua.slice(ua.indexOf('android') + 8)
09:25:36.908 " mobile; rv:36.0) gecko/36.0 firefox/36.0"
09:26:04.045 parseFloat(ua.slice(ua.indexOf('android') + 8))
09:26:04.047 NaN


We need to find a contact at the Wall Street Journal for fixing the JavaScript.
Whiteboard: [country-us] [video] [js] [contactready]
This is working now.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Web Compatibility
Component: Mobile → Site Reports
You need to log in before you can comment on or make changes to this bug.