Closed TobbeMobiTV closed 9 years ago
@TobbeMobiTV Thanks for pointing that out, it was poorly implemented by me. For some reason I expected the length to be one, regardless where you insert a single element. The reason I used the id as an index is because the same event might be signaled multiple times. That way it was easy to just check if the event already exist. Can you issue a pull request for your fix or do you want me to do that? Or maybe @AkamaiDASH or @KozhinM have also a suggestion on that? Best regards Daniel
I saw your motivation in a comment. The length property of arrays in Javascript is sort of pathological... I'll issue a pull request that you and others can review.
Pull-request has been accepted, so I close this issue.
The browser stalls for big ids in emsg.
Events are added with its id as a index in an array in the addInbandEvents function in EventController.js.
In the triggerEvents function, there is then a loop
which runs from 0 to the events.length, but in this case it becomes id due to the bad indexing.
This can be tested by using the dash-live-source-simualator with SCTE-35 Splice Insert events http://vm2.dashif.org/livesim-dev/scte35_2/testpic_2s/Manifest.mpd
The emsg ids are huge, such as 716411340, since they are based on time of the events.
A suggested fix is to change the triggerEvents lines to:
The same issue exists in removeEvents.
With these changed it worked to stream with the SCTE-35 events without any stalls.