Skip to content

Commit

Permalink
Revert "fix(SUP-40595):New player version (#741)"
Browse files Browse the repository at this point in the history
This reverts commit 136d2ee.
  • Loading branch information
inbalvasserman authored Dec 20, 2023
1 parent 136d2ee commit fce13de
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/engines/html5/media-source/adapters/native-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,6 @@ export default class NativeAdapter extends BaseMediaSourceAdapter {
* @private
*/
_captionsHidden: boolean = false;
/**
* sources for adapter
* @type {HTMLElement}
* @private
*/
_sourceElement = null;
/**
* Checks if NativeAdapter can play a given mime type.
* @function canPlayType
Expand Down Expand Up @@ -449,8 +443,9 @@ export default class NativeAdapter extends BaseMediaSourceAdapter {
*/
detachMediaSource(): void {
this._lastTimeDetach = this._videoElement.currentTime;
if (this._sourceElement) {
this._videoElement.removeChild(this._sourceElement);
if (this._videoElement && this._videoElement.src) {
Utils.Dom.setAttribute(this._videoElement, 'src', '');
Utils.Dom.removeAttribute(this._videoElement, 'src');
}
this._loadPromise = null;
}
Expand Down Expand Up @@ -502,7 +497,6 @@ export default class NativeAdapter extends BaseMediaSourceAdapter {
source.setAttribute('type', mimetype + ';mediaOption=' + mediaOption);
}
this._videoElement.appendChild(source);
this._sourceElement = source;
} else {
this._videoElement.src = updatedRequest.url;
}
Expand Down

0 comments on commit fce13de

Please sign in to comment.