Closed Bug 794100 (brightcove) Opened 12 years ago Closed 9 years ago

h264 video player (Brightcove) is busted on non-flash enabled FF Android or FF OS


(Web Compatibility :: Site Reports, defect)

Not set


(firefox16 unaffected, firefox17 fixed, firefox18 fixed, firefox19 fixed)

Tracking Status
firefox16 --- unaffected
firefox17 --- fixed
firefox18 --- fixed
firefox19 --- fixed


(Reporter: jsmith, Unassigned)




(Whiteboard: [clientsniff][country-all][sitewait][lib-brightcove])


(1 file)

Upon doing testing on via playing videos in the video player, we discovered that sites making use of the BrightCove video player result in FF Android user agents getting served flash content, not h264 content. We need to outreach to BrightCove to get them to serve us HTML 5 video content instead of flash content.
Are you sure? On Wired Video, while I get a broken player, I see the following configuration served (no Flash plugin) to my Galaxy Nexus (4.1.1)

           var experienceJSON = {
               "success": true,
               "data": {
                   "adPolicy": {
                       "adPlayCap": 1,
                       "firstAdPlay": 1,
                       "id": null,
                       "midrollAdKeys": null,
                       "midrollAds": false,
                       "onLoadAdKeys": "kw=player",
                       "playAdOnLoad": false,
                       "playerAdKeys": ";kw=html5;kw=library;kw=preroll",
                       "postrollAdKeys": ";kw=postroll;kw=postroll",
                       "postrollAds": true,
                       "prerollAdKeys": ";kw=preroll;kw=html5;kw=library",
                       "prerollAds": true,
                       "timeAdPlayInterval": 180,
                       "timeBasedPolicy": false,
                       "titleAdPlayInterval": 1,
                       "titleBasedPolicy": true,
                       "version": null,
                       "zone": 0
                   "adPolicySWF": null,
                   "adServerURL": "http:\/\/\/pfadx\/\/",
                   "adTranslationSWF": null,
                   "analyticsTrackers": ["TR-JSL-E17", "TR-JEP-23S"],
                   "configuredProperties": {
                       "application": {
                           "featureSwitches": "010111111",
                           "enableAPI": "true",
                           "theme": "Minimal",
                           "backgroundImage": "http:\/\/\/images\/1564549380\/1564549380_1753222175_wiredBG.jpg?pubId=1564549380",
                           "html5Enabled": "true"
                       "plugins": {
                           "list": "http:\/\/\/swf\/as3\/v4.9.9\/utility.swf?vmKey=5759ccaef9c011e08b400019b9f1584b&pixel=1"
                       "videoPlayer": {
                           "removeBranding": "true",
                           "autoStart": "true",
                           "showNewest": "false",
                           "showMostViewed": "false",
                           "showRelated": "false"
                   "hasProgramming": false,
                   "id": 1716442119,
                   "isDefaultViralTemplate": false,
                   "layout": "<Runtime><Theme name='Deluxe' style='Light'\/><Layout><VBox padding='3'><VideoPlayer id='videoPlayer'\/><\/VBox><\/Layout><\/Runtime>",
                   "linkBaseURL": "http:\/\/\/video?bcpid=1716442119&bckey=AQ~~,AAAAAF1BIQQ~,g5cZB_aGkYYrkroPj2mIhYaMgpst9vO7",
                   "linkURL": null,
                   "name": "Portal Player",
                   "nextGenAnalyticsEnabled": false,
                   "playerKey": "AQ~~,AAAAAF1BIQQ~,g5cZB_aGkYYrkroPj2mIhYaMgpst9vO7",
                   "programmedContent": {
                       "videoPlayer": {
                           "cause": -1,
                           "componentRefId": "videoPlayer",
                           "id": null,
                           "mediaDTO": {
                               "FLVFullCodec": 3,
                               "FLVFullLengthStreamed": false,
                               "FLVFullLengthURL": "http:\/\/\/streams\/1564549380\/1564549380_1858882423001_-PV--------VS------TGS2012-Ver--.mp4",
                               "FLVFullSize": 13780332,
                               "FLVPreBumperControllerType": 0,
                               "FLVPreBumperStreamed": false,
                               "FLVPreBumperURL": null,
                               "FLVPreviewCodec": 0,
                               "FLVPreviewSize": 0,
                               "FLVPreviewStreamed": false,
                               "FLVPreviewURL": null,
                               "IOSRenditions": [],
                               "SWFVerificationRequired": false,
                               "WMVFullAssetId": null,
                               "WMVFullLengthURL": null,
                               "adCategories": null,
                               "adKeys": null,
                               "allowViralSyndication": true,
                               "allowedCountries": [],
                               "awards": null,
                               "captions": null,
                               "categories": [],
                               "color": null,
                               "controllerType": 9,
                               "creationDate": "1348508833113",
                               "cuePoints": null,
                               "customFieldValues": null,
                               "customFields": null,
                               "dateFiltered": false,
                               "displayName": "Professor Layton, Phoenix Wright Team For Ultimate Sleuthing Game",
                               "drmMetadataURL": null,
                               "economics": 1,
                               "encodingRate": 499155,
                               "endDate": null,
                               "excludeListedCountries": false,
                               "filterEndDate": null,
                               "filterStartDate": null,
                               "forceAds": false,
                               "geoRestricted": false,
                               "id": 1858846870001,
                               "isSubmitted": false,
                               "language": null,
                               "length": 219104,
                               "lineupId": null,
                               "linkText": null,
                               "linkURL": null,
                               "logoOverlay": null,
                               "longDescription": null,
                               "monthlyAmount": null,
                               "numberOfPlays": 0,
                               "previewLength": 0,
                               "publishedDate": "1348508833113",
                               "publisherId": 1564549380,
                               "publisherName": "Conde Net - Wired",
                               "purchaseAmount": null,
                               "ratingEnum": null,
                               "referenceId": null,
                               "renditions": [{
                                   "audioOnly": false,
                                   "defaultURL": "http:\/\/\/streams\/1564549380\/1564549380_1858895118001_-PV--------VS------TGS2012-Ver--.mp4",
                                   "encodingRate": 1799282,
                                   "frameHeight": 720,
                                   "frameWidth": 1280,
                                   "mediaDeliveryType": 1,
                                   "size": 48894156,
                                   "videoCodec": "H264",
                                   "videoContainer": 1
                               }, {
                                   "audioOnly": false,
                                   "defaultURL": "http:\/\/\/streams\/1564549380\/1564549380_1858880726001_-PV--------VS------TGS2012-Ver--.mp4",
                                   "encodingRate": 141032,
                                   "frameHeight": 224,
                                   "frameWidth": 400,
                                   "mediaDeliveryType": 1,
                                   "size": 3952487,
                                   "videoCodec": "H264",
                                   "videoContainer": 1
                               }, {
                                   "audioOnly": false,
                                   "defaultURL": "http:\/\/\/streams\/1564549380\/1564549380_1858880737001_-PV--------VS------TGS2012-Ver--.mp4",
                                   "encodingRate": 1199282,
                                   "frameHeight": 404,
                                   "frameWidth": 720,
                                   "mediaDeliveryType": 1,
                                   "size": 32379105,
                                   "videoCodec": "H264",
                                   "videoContainer": 1
                               }, {
                                   "audioOnly": false,
                                   "defaultURL": "http:\/\/\/streams\/1564549380\/1564549380_1858880028001_-PV--------VS------TGS2012-Ver--.mp4",
                                   "encodingRate": 800000,
                                   "frameHeight": 360,
                                   "frameWidth": 640,
                                   "mediaDeliveryType": 1,
                                   "size": 21693978,
                                   "videoCodec": "H264",
                                   "videoContainer": 1
                               }, {
                                   "audioOnly": false,
                                   "defaultURL": "http:\/\/\/streams\/1564549380\/1564549380_1858882423001_-PV--------VS------TGS2012-Ver--.mp4",
                                   "encodingRate": 499155,
                                   "frameHeight": 268,
                                   "frameWidth": 480,
                                   "mediaDeliveryType": 1,
                                   "size": 13780332,
                                   "videoCodec": "H264",
                                   "videoContainer": 1
                               }, {
                                   "audioOnly": false,
                                   "defaultURL": "http:\/\/\/streams\/1564549380\/1564549380_1858894587001_-PV--------VS------TGS2012-Ver--.mp4",
                                   "encodingRate": 318213,
                                   "frameHeight": 224,
                                   "frameWidth": 400,
                                   "mediaDeliveryType": 1,
                                   "size": 8892254,
                                   "videoCodec": "H264",
                                   "videoContainer": 1
                               "rentalAmount": null,
                               "rentalPeriod": null,
                               "sharedBy": null,
                               "sharedByExternalAcct": false,
                               "sharedSourceId": null,
                               "sharedToExternalAcct": false,
                               "shortDescription": "Japan's popular portable detectives team up for their first ever crossover game, 'Professor Layton vs Phoenix Wright', coming November 29 for the Nintendo 3DS in Japan.",
                               "startDate": null,
                               "submitted": false,
                               "tags": [{
                                   "image": null,
                                   "name": "game trailers"
                               }, {
                                   "image": null,
                                   "name": "wired"
                               }, {
                                   "image": null,
                                   "name": "Library"
                               }, {
                                   "image": null,
                                   "name": "gaming"
                               }, {
                                   "image": null,
                                   "name": "3ds"
                               }, {
                                   "image": null,
                                   "name": "nintendo"
                               "thumbnailURL": "http:\/\/\/images\/1564549380\/1564549380_1858882427001_th-50609ca1ef18b0e4e0102e57-1592194039001.jpg?pubId=1564549380",
                               "version": null,
                               "videoStillURL": "http:\/\/\/images\/1564549380\/1564549380_1858882426001_vs-50609ca1ef18b0e4e0102e57-1592194039001.jpg?pubId=1564549380",
                               "yearProduced": null
                           "mediaId": 1858846870001,
                           "playerId": null,
                           "type": 0,
                           "version": null
                   "programmingComponents": ["videoPlayer"],
                   "publisherId": 1564549380,
                   "publisherType": "PREMIUM",
                   "userCountry": null,
                   "version": null

The important bits are the objects in the renditions array, I see MP4 files.
Yeah, I can confirm on my galaxy nexus (Android 4.04) that I'm getting served flash content instead with Nightly.
Attached image Wired Video
This is what I'm seeing.
Two seperate issues here, shall we morph this to investigating why their player is broken for us?

BrightCove test player:
(In reply to Aaron Train [:aaronmt] from comment #4)
> Two seperate issues here, shall we morph this to investigating why their
> player is broken for us?
> BrightCove test player:

Summary: h264 video player (Brightcove) serves us flash content, not a h264 video player on h264 supported platforms → h264 video player (Brightcove) is busted on non-flash enabled FF Android or FF OS
Does the Brightcove problem affect both Nightly 18 and Aurora 17? When I was recently investigating a HTML5 video bug with Flash disabled, some sites served me different video content on Aurora 17 and Nightly 18.
Hello Folks

I haven't seen an update in a few days. It would be great to get a resolution on this as Wired is a priority partner for the Marketplace.

Additionally, Marketing is looking to speak about the app in an upcoming campaign. The deadline for to be working and included is tomorrow.

Please let me know if there is anything I can do to raise priority on this.

Actually, we don't need the fix for Wired until the 9th.  If we could at least get an answer today on if that target is possible, that would be super!
Is the issue that Brightcove is serving us Flash video instead of HTML5 video? That is likely something Brightcove will need to fix in their video player.

Wired serves me Flash video, but it will serve me HTML5 H264 if I use the "Phony" add-on to spoof a WebKit User-Agent string.
My impression is that they are not recognizing us for compatibility. For example, on Nightly, the test-page below fails.


On their player test-page below, on my Nexus 7, I get a broken player.

Player test-page:
Should we be providing instructions to on how to recognize us for compatibility?

If so, what needs to be changed on their end?
This bug should be fixed by my patch for bug 794171.

If Brightcove or Wired _really_ want to workaround our bug in the meantime, they could change their H.264 detection script to check:

  video.canPlayType('video/mp4; codecs="avc"')

in * to:

  video.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')

However, I do not recommend this because the codecs="avc" format is technically invalid and bug 794171 should fix our bug before Firefox 17 leaves beta.
Assignee: nobody → cpeterson
Depends on: 794171
^ that should read "in addition to:"
I fixed bug 794171, so this Brightcove bug should be fixed in the next builds of Nightly 19, Aurora 18, and Beta 17.
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 19
Retested the Wired app in Aurora, and now videos don't play at all.  Screenshot:

It also seems that pages are taking WAY longer to load, leaving the user staring at a white screen for approx 10 seconds.  I'm not seeing this happen in other apps, so perhaps it's a server load issue, but noting it here just in case.
Resolution: FIXED → ---
doublec, can you please take a look at this bug? My change in bug 794171 fixed Brightcove's compatibility test page, but did not fix Brightcove's video player test or's videos.

 * Compatibility test:
 * Player test:
Assignee: cpeterson → chris.double
Whiteboard: [swdecoder]
Assignee: chris.double → cpearce
Component: Evangelism → Mobile
Product: Firefox for Android → Tech Evangelism
Target Milestone: Firefox 19 → ---
Version: Firefox 18 → unspecified
I've been looking into this, and I'm pretty sure this is a problem in Brightcove's player.

I can reproduce the inability to play H.264 in a GStreamer build of Firefox desktop with the user agent set to masquerade as Fennec/Android. However I can play the video with Firefox w/GStreamer if I load the video directly (url: ).

The furthest I've been able to minimize the test case is getting it down to this:

Brightcove's player is inside an <iframe>, and that's the iframe's contents after the player has initialized.

That (slightly more) minimized testcase works in Chrome on desktop Linux. Chrome's DOM inspector equivalent tells me that the <video> element has width and height attributes greater than 1 pixel. However when that minimized testcase is loaded in a Firefox GStreamer build the <video> element has width=1 height=1 attributes, i.e. the video isn't visible. If I change the width and height attributes using Firefox's DOM Inspector to non-1-pixel values the video becomes visible.

If I change my GStreamer build of Firefox's user agent to masquerade as Chrome, the minimized testcase works (though does not), so I think it's reasonable to assume that Brightcove's player is sniffing the user agent and isn't handling Firefox when it does.

So we need someone from Brightcove to look fix this on their side. I will make a Firefox GStreamer build with the ability to change the user agent string to assist Brightcove in testing.
Since this is not an issue with the Firefox code, I'm removing [swdecoder] from the whiteboard.  I just talked to Lawrence, and he's going to reach out to Brightcove to get this bug on their radar.  

I'm reassigning this to Lawrence since cpearce's work is done and Lawrence seems like the logical owner at this point. Thanks.
Whiteboard: [swdecoder]
Assignee: cpearce → lmandel
Blocks: 868048
CC'ing a Brightcove employee.
See Also: → 881072
Somewhat depressing UA sniffing:

	brightcove.checkHtmlSupport = function() {
		var v = brightcove.createElement('video');
		var videoSupport = true;
		if (!brightcove.userAgent.match(new RegExp("android", "i"))) {
			videoSupport = !!(v.canPlayType && v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/no/, ''));
		if (brightcove.userAgent.match(/BlackBerry.*Version\/6\.0/)) {
			return false;
		var canvasSupport = !!brightcove.createElement('canvas').getContext;
		return videoSupport && canvasSupport;
	brightcove.isSupportedHTMLDevice = function(pUAString) {
		var types = ["iPad", "iPhone", "iPod", "android", "Silk"];
		var numTypes = types.length;
		var uaString = pUAString || brightcove.userAgent;
		for (var i = 0; i < numTypes; i++) {
			if (uaString.match(new RegExp(types[i], "i"))) {
				return true;
		return false;

And then it does:

		if (htmlSupport) {
			if (brightcove.isSupportedHTMLDevice() || experience.params.htmlFallback) {
				return brightcove.playerType.HTML;
		return brightcove.playerType.NO_SUPPORT;
If the feature detection ran without the UA sniffing, try this on device for the result:
(Seems the Gaia browser's response to that feature detection isn't being honest though.. As it says "probably" I keep trying to get an MP4 file to play, but it doesn't seem to work - not that I expected it to, but seeing "probably" from canPlayType() was sort of promising. So if we're lying the sniffing is there for a good reason :-/)
We return "probably" for H.264, but I also saw "maybe" for other types (when just a container is specified and no codec). Both values are acceptable and pass what they are testing for.

The actual problem is their isSupportedHTMLDevice test, as it doesn't include "Firefox".

All test cases collected here, including:

Do we have a relationship with Brightcove to fix their UA detection, Hallvord?
Flags: needinfo?(hsteen)
We will of course be contacting them again about the sniffing. FirefoxOS might be an interesting target for them now the phones are actually shipping, and I think Fx on Android also has way more installs now than last time we discussed this. (On the other hand, when the feature detection approach is so shaky I can totally understand that they end up white-listing user-agents.. :-( it would be nice if canPlayType() was more reliable.)
Flags: needinfo?(hsteen)
Verified that their demo plays fine in my Geeksphone Peek with FirefoxOS 1.1 after changing their isSupportedHTMLDevice() method.

Contacted again by E-mail, following up an older discussion.
Assignee: lmandel → hsteen
Whiteboard: [clientsniff][country-all][sitewait]
Whiteboard: [clientsniff][country-all][sitewait] → [clientsniff][country-all][sitewait][lib-brightcove]
Alias: brightcove
Below I paste the last response from Brightcove support. Based on this, this bug is both WONTFIX (for their old player) and FIXED (for their new player). We need to go through the dependencies (other sites using Brightcove) and check if they are using the old or the new player - if they are using the old one, we should contact them and suggest they update to using the new one.

Brightcove support says:

Thank you for your reply. That link is the older Smart Player. The players do look different visually, but the most foolproof way to determine which version is loaded is to check the page source code: if you can see any reference to BrightcoveExperiences.js, "experience", "" or "", it will be the Smart Player. None of those terms or URLs are used in the new player.

The new player exclusively uses JavaScript from "".

This page has a good demonstration of the new Brightcove Player:

All players are hosted centrally so any fixes/changes we make are automatically pushed out to customer sites (there is a way to force a specific version when deploying a player, but I would not expect many people to be making use of that). I'm afraid that there are no plans to expand browser support for the legacy Smart Player as all development work is focused on the new Brightcove Player. As customers move over to it, support for Firefox will broaden.

The "install Flash" message definitely comes from the Smart Player. There's a lot going on behind the scenes so that adding Firefox to the "allowed" browser list would just be the beginning!
Assignee: hsteen → jeroentulp
I've verified the new player works fine on both Firefox Android and Firefox OS. I will go through the duplicates and dependencies and re-open those we need to contact.
Closed: 12 years ago9 years ago
Resolution: --- → FIXED
Assignee: jeroentulp → nobody
See Also: → 1164877
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.