Webcam Stream + asm.js behavior changed in FF v47 (only on Mac)




a year ago
4 months ago


(Reporter: marcel.klammer, Unassigned)


(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [gfx-noted])



a year ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36

Steps to reproduce:

Emscripten compiled Face Tracking library: BRF.

Works fine in FF (Mac) v46.0.1 and below.
Works fine in FF (Win)
Works fine in FF (Linux) up until Nightly.

Works fine in FF (Mac) up until Nightly, when providing an image as input to track.

Does not work in FF (Mac) from 47.0b1 when having webcam stream as input.

Links to reproduce:

Image as input: (click on each eyes to start the tracking, click again to switch image)

Webcam as input:

Actual results:

BRF compiles to asm code in FF, but the webcam input stream is faulty and so the lib doesn't work properly.

So my guess: Something changed in the handling of the webcam pixel buffer in FF (Mac) v47.0b1. Maybe a faulty type (int instead of float/double somewhere). Images do work, Webcams on Mac don't.

Expected results:

Same behavior as in FF on Windows and Linux.


a year ago
Blocks: 710398
OS: Unspecified → Mac OS X

Comment 1

a year ago
Created a more minimal example (Webcam needed):

Please open it in FF on Mac (v47 or higher)

The only difference between the two is the order of drawImage and getImageData:

// working, ... );
brfManager.update(brfBmdContext.getImageData( ... ).data);


// not working
brfManager.update(brfBmdContext.getImageData( ... ).data);, ... );


config.input is a video playing the webcam stream
brfBmdContext is a context of a canvas and is another canvas.

brfManager.update is a function that calls asm.js compiled code.


a year ago
Component: Untriaged → Graphics
Product: Firefox → Core
Hi Munro,
Is there any change for the video stream?
Flags: needinfo?(mchiang)
Whiteboard: [gfx-noted]

Both samples work on my mbp with the latest nightly build.
Flags: needinfo?(mchiang)

Comment 4

a year ago
Just updated Firefox Nightly from

51.0a1 (2016-08-04) to
51.0a1 (2016-08-24)

The bug seems to be gone in the new version. 

Will check in upcoming versions as well.
Thanks for the fix.

Best Regards
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.