Closed Bug 1353494 Opened 8 years ago Closed 7 years ago

drawing a video element's content into a canvas results in an inverted image

Categories

(Firefox for Android Graveyard :: General, defect)

52 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: freezey, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Steps to reproduce: This was working correctly prior to installing the Firefox update just released over the weekend. Create a <video> element with a camera as the video source video = jQuery('<video></video>'); video.attr('width', videoWidth); video.attr('height', videoHeight); $this.append(video); navigator.mediaDevices.getUserMedia(constraints).then( function(stream) { video.get(0).src = window.URL.createObjectURL(stream); video.get(0).play(); }, function(err) { console.log("Unable to get video stream!") } ); Create a canvas element and draw the video stream onto the canvas canvas = jQuery('<canvas style="display: none;"></canvas>'); canvas.attr('width', videoWidth); canvas.attr('height', videoHeight); $this.append(canvas); var context = canvas.get(0).getContext('2d'); context.drawImage(video.get(0),0,(videoHeight-360)/2, 640, 360); Actual results: The video image is drawn onto the canvas, but it is upside down. Expected results: The video image is drawn onto the canvas with the same orientation as was shown in the <video> element when it was drawn.
What device? What version of Android?
Nexus 7 2013 running Android 6.x Samsung Galaxy Tab A (SMT-350) running Android 6.0.1 Nexus 5x running Android 7.1.1 All three devices give the same problem.
Closing per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195 Contact :susheel if you think this bug should be re-opened
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.