blob: 4e22260fcbebf8cfbd1cdd51e018ec86f6bdb487 [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":1920,"height":1280}]} - 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