blob: 57fa628f026ceec0a92b0d8d302be19ee85b69dd [file] [log] [blame]
Tests applyConstraints on a video stream track.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS stream.getVideoTracks().length is 1
PASS stream.getAudioTracks().length is 0
PASS video.videoTracks.length is 1
PASS video.audioTracks.length is 0
** Constraint: {"width":640,"height":480} - setup width and height.
PASS settings['width'] is 640
PASS settings['height'] is 480
** Constraint: {"width":{"min":320},"height":{"min":240},"advanced":[{"width":3000,"height":2000}]} - advanced width and height are not supported, minimums are less than current, nothing is changed.
PASS settings['width'] is 640
PASS settings['height'] is 480
** Constraint: {"width":{"min":640},"height":{"min":480},"advanced":[{"width":6000,"height":6000},{"width":1280,"height":720}]} - first width and height in advanced are too big, second is used.
PASS settings['width'] is 1280
PASS settings['height'] is 720
** Constraint: {"width":320,"height":240} - reset width and height.
PASS settings['width'] is 320
PASS settings['height'] is 240
** Constraint: {"width":{"min":640},"height":{"min":480},"advanced":[{"width":7680,"height":4320}]} - advanced width and height are too big, fall back to required minimums.
PASS settings['width'] is 640
PASS settings['height'] is 480
** Constraint: {"width":320,"height":240} - reset width and height.
PASS settings['width'] is 320
PASS settings['height'] is 240
** Constraint: {"advanced":[{"facingMode":"left"},{"facingMode":"right"},{"facingMode":"environment"},{"facingMode":"user"}]} - no required constraints, advanced constraints are ignored.
PASS settings['facingMode'] is "user"
PASS successfullyParsed is true
TEST COMPLETE