Skip to content

Commit

Permalink
fix lint and types
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanTGold committed Dec 20, 2023
1 parent 8681c8a commit cfd58e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/engines/html5/media-source/adapters/native-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ export default class NativeAdapter extends BaseMediaSourceAdapter {

private _segmentDuration: number = 0;

_startTimeOfDvrWindowInterval: IntervalID;
private _startTimeOfDvrWindowInterval: number | undefined;

_startTimeOfDvrWindow: number = 0;
private _startTimeOfDvrWindow: number = 0;

/**
* A counter to track the number of attempts to recover from media error
Expand Down Expand Up @@ -669,13 +669,13 @@ export default class NativeAdapter extends BaseMediaSourceAdapter {
* @returns {void}
* @private
*/
_maybeRemoveSourceTag(): void {
private _maybeRemoveSourceTag(): void {
if (this._config.useSourceTag && this._videoElement) {
const source = this._videoElement.firstChild;
const source = this._videoElement.firstChild as HTMLElement;
if (source) {
Utils.Dom.setAttribute(source, 'src', '');
Utils.Dom.removeAttribute(source, 'src');
Utils.Dom.removeChild(this._videoElement, source);
source.setAttribute('src', '');
source.removeAttribute('src');
this._videoElement.removeChild(source);
}
}
}
Expand Down Expand Up @@ -1353,7 +1353,7 @@ export default class NativeAdapter extends BaseMediaSourceAdapter {
return this._startTimeOfDvrWindow;
}

_setStarTimeOfDvrWindowInterval() {
private _setStarTimeOfDvrWindowInterval(): void {
const intervalTime = 1000;
this._startTimeOfDvrWindowInterval = setInterval(() => {
//get Segment duration
Expand Down
2 changes: 1 addition & 1 deletion src/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1855,7 +1855,7 @@ export default class Player extends FakeEventTarget {
* @private
* @returns {void}
*/
_handlePlaybackRate(): void {
private _handlePlaybackRate(): void {
if (typeof this._playbackAttributesState.rate === 'number') {
this.playbackRate = this._playbackAttributesState.rate;
} else if (typeof this._config.playback.playbackRate === 'number') {
Expand Down

0 comments on commit cfd58e0

Please sign in to comment.