Skip to content

Commit

Permalink
fix: remove video source child node (#737)
Browse files Browse the repository at this point in the history
* fix: remove video source child node

* Update native-adapter.js

---------

Co-authored-by: Moshe Maor <[email protected]>
  • Loading branch information
OrenMe and MosheMaorKaltura authored Nov 29, 2023
1 parent ae38dd5 commit 7dea414
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/engines/html5/media-source/adapters/native-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,14 @@ export default class NativeAdapter extends BaseMediaSourceAdapter {
this._waitingEventTriggered = false;
this._progressiveSources = [];
this._loadPromise = null;
if (this._config['useSourceTag'] && this._videoElement) {
const source = this._videoElement.firstChild;
if (source) {
Utils.Dom.setAttribute(source, 'src', '');
Utils.Dom.removeAttribute(source, 'src');
Utils.Dom.removeChild(this._videoElement, source);
}
}
this._nativeTextTracksMap = {};
this._loadPromiseReject = null;
this._liveEdge = 0;
Expand Down

0 comments on commit 7dea414

Please sign in to comment.