| Test adding and removing tracks. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS streamCopy.active is false |
| PASS streamCopy.active is true |
| PASS stream1.active is true |
| PASS stream1.getAudioTracks().length is 1 |
| PASS stream1.getVideoTracks().length is 1 |
| PASS stream2.active is true |
| PASS stream2.getAudioTracks().length is 1 |
| PASS stream2.getVideoTracks().length is 1 |
| |
| *** remove an audio track |
| PASS stream1.getAudioTracks().length is 0 |
| PASS stream1.getTrackById(audioTrack.id) is null |
| |
| *** remove a non-existent (already removed) track (should not throw) |
| |
| *** add the track back to the stream |
| |
| *** remove a video track |
| PASS stream1.getVideoTracks().length is 0 |
| PASS stream1.getTrackById(videoTrack.id) is null |
| |
| *** remove a non-existent (already removed) track (should not throw) |
| |
| *** add the track back to the stream |
| |
| *** verify added tracks |
| PASS stream1.getAudioTracks().length is 1 |
| PASS stream1.getVideoTracks().length is 1 |
| PASS stream1.getAudioTracks()[0].kind is audioTrack.kind |
| PASS stream1.getAudioTracks()[0].label is audioTrack.label |
| PASS stream1.getVideoTracks()[0].kind is videoTrack.kind |
| PASS stream1.getVideoTracks()[0].label is videoTrack.label |
| |
| *** try adding a stream's own tracks again (nothing should happen) |
| PASS stream1.getAudioTracks().length is 1 |
| PASS stream1.getVideoTracks().length is 1 |
| |
| *** add tracks from another stream |
| |
| *** verify added tracks |
| PASS stream1.getAudioTracks().length is 2 |
| PASS stream1.getVideoTracks().length is 2 |
| |
| *** remove all tracks, stream will become inactive |
| PASS stream2.getAudioTracks().length is 0 |
| PASS stream2.getVideoTracks().length is 0 |
| PASS stream2.active is false |
| PASS stream2.active is false |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |