blob: 3d7e42a0db1f3fdb262e7d83900a7637d29da4f0 [file] [log] [blame]
Tests MediaStreamTrack callbacks.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS getUserMedia succeeded.
videoTrack = mediaStream.getVideoTracks()[0]
PASS track.readyState is "live"
checking track.capabilities()
sourceId
0 : 239c24b0-2b15-11e3-8224-0800200c9a66
sourceType
0 : camera
1 : microphone
width
min : 320
max : 1920
supported : true
height
min : 240
max : 1080
supported : true
frameRate
min : 15
max : 60
supported : true
aspectRatio
min : 1.33
max : 1.78
supported : true
facingMode
0 : user
1 : environment
checking track.states()
PASS states.sourceId is capabilities.sourceId[0]
PASS states.sourceType is "camera"
states.volume = undefined
states.width = 1920
states.sourceId = 239c24b0-2b15-11e3-8224-0800200c9a66
states.height = 1080
states.sourceType = camera
states.facingMode = user
states.frameRate = 30
states.aspectRatio = 1.78
audioTrack = mediaStream.getAudioTracks()[0]
PASS track.readyState is "live"
checking track.capabilities()
sourceId
0 : 239c24b1-2b15-11e3-8224-0800200c9a66
volume
min : 0
max : 100
supported : true
checking track.states()
PASS states.sourceId is capabilities.sourceId[0]
PASS states.sourceType is "microphone"
states.volume = 50
states.width = undefined
states.sourceId = 239c24b1-2b15-11e3-8224-0800200c9a66
states.height = undefined
states.sourceType = microphone
states.facingMode = undefined
states.frameRate = undefined
states.aspectRatio = undefined
videoTrack2 = videoTrack.clone()
PASS track.readyState is "live"
checking track.capabilities()
sourceId
0 : 239c24b0-2b15-11e3-8224-0800200c9a66
sourceType
0 : camera
1 : microphone
width
min : 320
max : 1920
supported : true
height
min : 240
max : 1080
supported : true
frameRate
min : 15
max : 60
supported : true
aspectRatio
min : 1.33
max : 1.78
supported : true
facingMode
0 : user
1 : environment
checking track.states()
PASS states.sourceId is capabilities.sourceId[0]
PASS states.sourceType is "camera"
states.volume = undefined
states.width = 1920
states.sourceId = 239c24b0-2b15-11e3-8224-0800200c9a66
states.height = 1080
states.sourceType = camera
states.facingMode = user
states.frameRate = 30
states.aspectRatio = 1.78
PASS videoTrack.id is not videoTrack2.id
PASS videoTrack.kind is videoTrack2.kind
PASS videoTrack.label is videoTrack2.label
PASS videoTrack.muted is videoTrack2.muted
PASS videoTrack.enabled is videoTrack2.enabled
PASS videoTrack.readyState is videoTrack2.readyState
track.stop() should not fire 'ended' on the track it is called on, but it should end all tracks using the same source
videoTrack2.stop()
PASS Track onended callback succeeded.
PASS videoTrack is event.target
PASS videoTrack.readyState is "ended"
PASS videoTrack2.readyState is "ended"
PASS successfullyParsed is true
TEST COMPLETE