Audio only stream causes exception in ControlBar.js that prevents playback
Created by: matt-hammond-001
Environment
- Link to playable MPD file: http://vm2.dashif.org/livesim/testpic_2s/audio.mpd
- Dash.js version: 2.3.0
- Browser name/version: Version 53.0.2785.101 (64-bit)
- OS name/version: Mac OS X 10.11.6
Steps to reproduce
- Open the v2.3.0 reference player
- Select an audio only MPD, and click "load" to begin playback
Observed behaviour
DASH stream does not commence playback due to exception raised by ControlBar.js
This appears to be because this line in ControlBar.js uses an if statement that assumes there are both video and audio tracks:
if (availableBitrates.audio.length > 1 || availableBitrates.video.length > 1) {
availableBitrates.video
is null
, causing the reference to availableBitrates.video.length
to raise an exception
Console output
Debug.js:108[10] EME detected on this user agent! (ProtectionModel_21Jan2015)
Debug.js:108[16] [dash.js 2.3.0] MediaPlayer has been initialized
Debug.js:108 [2665] Playback Initialized
Debug.js:108 [3021] Parsing complete: ( xml2json: 2.32ms, objectiron: 0.725ms, total: 0.00305s)
Debug.js:108 [3022] Manifest has been refreshed at Thu Sep 08 2016 12:31:08 GMT+0100 (BST)[1473334268.555]
Debug.js:108 [11985] Matching default timing source protocol to manifest protocol: http://time.akamai.com/?iso
Debug.js:108 [12041] Local time: Thu Sep 08 2016 12:31:17 GMT+0100 (BST)
Debug.js:108 [12042] Server time: Thu Sep 08 2016 12:31:16 GMT+0100 (BST)
Debug.js:108 [12042] Difference (ms): -1574
Debug.js:108 [12046] MediaSource attached to element. Waiting on open...
Debug.js:108 [12054] MediaSource is open!
Debug.js:108 [12054] Duration successfully set to: 1.7976931348623157e+308
Debug.js:108 [12055] Added 0 inline events
Debug.js:108 [12056] No video data.
Debug.js:108 [12056] audio codec: audio/mp4;codecs="mp4a.40.2"
Debug.js:108 [12066] Schedule controller stopping for audio
Debug.js:108 [12070] No text data.
Debug.js:108 [12070] No fragmentedText data.
Debug.js:108 [12070] No embeddedText data.
Debug.js:108 [12070] No muxed data.
onStreamInitialized @ ControlBar.js:287
(anonymous function) @ EventBus.js:87
trigger @ EventBus.js:87
checkIfInitializationCompleted @ Stream.js:457
initializeMedia @ Stream.js:437
activate @ Stream.js:124
onMediaSourceOpen @ StreamController.js:427