blob: c0dcb37a177c94a02dc4352bffb53ba1e6354952 [file] [log] [blame]
Tests that the stream displays captured buffers to the video element.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
=== checking pixels from front camera ===
PASS mediaDevices.getUserMedia generated a stream successfully.
videos[0].srcObject = mediaStream
videos[0].play()
PASS isPixelTransparent(buffer) is true
context.drawImage(videos[0], 0, 0, 680, 360)
PASS isPixelTransparent(buffer) is false
PASS isPixelBlack(buffer) is false
PASS isPixelTransparent(buffer) is false
PASS isPixelBlack(buffer) is true
=== checking pixels from back camera ===
PASS mediaDevices.getUserMedia generated a stream successfully.
videos[1].srcObject = mediaStream
videos[1].play()
PASS isPixelTransparent(buffer) is true
context.drawImage(videos[1], 0, 0, 680, 360)
PASS isPixelTransparent(buffer) is false
PASS isPixelBlack(buffer) is false
PASS isPixelTransparent(buffer) is false
PASS isPixelGray(buffer) is true
PASS successfullyParsed is true
TEST COMPLETE