Skip to content

Commit

Permalink
fix: Allow streaming again when we reset MSE (#7495)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad authored Oct 24, 2024
1 parent 576e4a5 commit bc90c87
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/media/media_source_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ shaka.media.MediaSourceEngine = class {
* @return {!MediaSource}
*/
createMediaSource(p) {
this.streamingAllowed_ = true;

/** @type {!MediaSource} */
let mediaSource;

Expand All @@ -193,11 +195,13 @@ shaka.media.MediaSourceEngine = class {

this.eventManager_.listen(
mediaSource, 'startstreaming', () => {
shaka.log.info('MMS startstreaming');
this.streamingAllowed_ = true;
});

this.eventManager_.listen(
mediaSource, 'endstreaming', () => {
shaka.log.info('MMS endstreaming');
this.streamingAllowed_ = false;
});
} else {
Expand Down

0 comments on commit bc90c87

Please sign in to comment.