hls.js 1.5.8-0.canary.10054 → 1.5.8-0.canary.10055
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hls.js +37 -32
- package/dist/hls.js.d.ts +1 -0
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +33 -29
- package/dist/hls.light.js.map +1 -1
- package/dist/hls.light.min.js +1 -1
- package/dist/hls.light.min.js.map +1 -1
- package/dist/hls.light.mjs +33 -29
- package/dist/hls.light.mjs.map +1 -1
- package/dist/hls.min.js +1 -1
- package/dist/hls.min.js.map +1 -1
- package/dist/hls.mjs +37 -32
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/package.json +1 -1
- package/src/controller/buffer-controller.ts +26 -25
- package/src/controller/cmcd-controller.ts +2 -2
- package/src/controller/fps-controller.ts +6 -0
- package/src/controller/id3-track-controller.ts +3 -4
- package/src/controller/stream-controller.ts +1 -1
- package/src/controller/timeline-controller.ts +2 -1
@@ -27,10 +27,12 @@ class FPSController implements ComponentAPI {
|
|
27
27
|
|
28
28
|
protected registerListeners() {
|
29
29
|
this.hls.on(Events.MEDIA_ATTACHING, this.onMediaAttaching, this);
|
30
|
+
this.hls.on(Events.MEDIA_DETACHING, this.onMediaDetaching, this);
|
30
31
|
}
|
31
32
|
|
32
33
|
protected unregisterListeners() {
|
33
34
|
this.hls.off(Events.MEDIA_ATTACHING, this.onMediaAttaching, this);
|
35
|
+
this.hls.off(Events.MEDIA_DETACHING, this.onMediaDetaching, this);
|
34
36
|
}
|
35
37
|
|
36
38
|
destroy() {
|
@@ -64,6 +66,10 @@ class FPSController implements ComponentAPI {
|
|
64
66
|
}
|
65
67
|
}
|
66
68
|
|
69
|
+
private onMediaDetaching() {
|
70
|
+
this.media = null;
|
71
|
+
}
|
72
|
+
|
67
73
|
checkFPS(
|
68
74
|
video: HTMLVideoElement,
|
69
75
|
decodedFrames: number,
|
@@ -137,11 +137,10 @@ class ID3TrackController implements ComponentAPI {
|
|
137
137
|
}
|
138
138
|
|
139
139
|
protected onMediaDetaching(): void {
|
140
|
-
if (
|
141
|
-
|
140
|
+
if (this.id3Track) {
|
141
|
+
clearCurrentCues(this.id3Track);
|
142
|
+
this.id3Track = null;
|
142
143
|
}
|
143
|
-
clearCurrentCues(this.id3Track);
|
144
|
-
this.id3Track = null;
|
145
144
|
this.media = null;
|
146
145
|
this.dateRangeCuesAppended = {};
|
147
146
|
}
|
@@ -528,8 +528,8 @@ export default class StreamController
|
|
528
528
|
if (media) {
|
529
529
|
media.removeEventListener('playing', this.onMediaPlaying);
|
530
530
|
media.removeEventListener('seeked', this.onMediaSeeked);
|
531
|
-
this.videoBuffer = null;
|
532
531
|
}
|
532
|
+
this.videoBuffer = null;
|
533
533
|
this.fragPlaying = null;
|
534
534
|
if (this.gapController) {
|
535
535
|
this.gapController.destroy();
|
@@ -130,7 +130,7 @@ export class TimelineController implements ComponentAPI {
|
|
130
130
|
hls.off(Events.SUBTITLE_TRACKS_CLEARED, this.onSubtitleTracksCleared, this);
|
131
131
|
hls.off(Events.BUFFER_FLUSHING, this.onBufferFlushing, this);
|
132
132
|
// @ts-ignore
|
133
|
-
this.hls = this.config = null;
|
133
|
+
this.hls = this.config = this.media = null;
|
134
134
|
this.cea608Parser1 = this.cea608Parser2 = undefined;
|
135
135
|
}
|
136
136
|
|
@@ -303,6 +303,7 @@ export class TimelineController implements ComponentAPI {
|
|
303
303
|
delete captionsTracks[trackName];
|
304
304
|
});
|
305
305
|
this.nonNativeCaptionsTracks = {};
|
306
|
+
this.media = null;
|
306
307
|
}
|
307
308
|
|
308
309
|
private onManifestLoading() {
|