blob: 5bcc5ea49d0afce82162e9d4d704b0c19def1ebd [file] [log] [blame]
Tests applyConstraints on an audio stream track.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS stream.getVideoTracks().length is 0
PASS stream.getAudioTracks().length is 1
PASS video.videoTracks.length is 0
PASS video.audioTracks.length is 1
** Constraint: {"volume":0.5} - set volume to a valid value.
PASS settings['volume'] is 0.5
PASS typeof settings['echoCancellation'] is 'boolean'
PASS settings['echoCancellation'] is true
** Constraint: {"volume":{"exact":2.1}} - the 'exact' constraint it too big, promise should reject and no settings should change.
PASS Promise was rejected
PASS error.constraint is "volume"
PASS settings['volume'] is 0.5
PASS typeof settings['echoCancellation'] is 'boolean'
PASS settings['echoCancellation'] is true
** Constraint: {"volume":{"exact":-1}} - the 'exact' constraint it too small, promise should reject and no settings should change.
PASS Promise was rejected
PASS error.constraint is "volume"
PASS settings['volume'] is 0.5
PASS typeof settings['echoCancellation'] is 'boolean'
PASS settings['echoCancellation'] is true
** Constraint: {"echoCancellation":false} - set echoCancellation to a valid value.
PASS settings['volume'] is 0.5
PASS typeof settings['echoCancellation'] is 'boolean'
PASS settings['echoCancellation'] is false
** Constraint: {"facingMode":"environment","frameRate":30,"volume":1} - constraint not supported by an audio track should be ignored.
PASS settings['volume'] is 1
PASS typeof settings['echoCancellation'] is 'boolean'
PASS settings['echoCancellation'] is false
PASS successfullyParsed is true
TEST COMPLETE