diff --git a/src/player.ts b/src/player.ts index bedf033e..25743cef 100644 --- a/src/player.ts +++ b/src/player.ts @@ -2919,10 +2919,10 @@ export default class Player extends FakeEventTarget { } public setSeekFrom(seekFrom: number): void { - this._externalCaptionsHandler?.setSeekFrom(seekFrom); + this._externalCaptionsHandler.seekFrom = seekFrom; } public setClipTo(clipTo: number): void { - this._externalCaptionsHandler?.setClipTo(clipTo); + this._externalCaptionsHandler.clipTo = clipTo; } } diff --git a/src/track/external-captions-handler.ts b/src/track/external-captions-handler.ts index c50b9c72..1f70abdd 100644 --- a/src/track/external-captions-handler.ts +++ b/src/track/external-captions-handler.ts @@ -618,11 +618,11 @@ class ExternalCaptionsHandler extends FakeEventTarget { return cuePoints.filter((cp: any) => cp.startTime >= seekFrom && (!clipTo || cp.startTime < clipTo)); } - public setSeekFrom(seekFrom: number): void { + public set seekFrom(seekFrom: number) { this._seekFrom = seekFrom; } - public setClipTo(clipTo: number): void { + public set clipTo(clipTo: number) { this._clipTo = clipTo; }