Fix dispatching STREAM_PLAYING event when playing normal video

This commit is contained in:
redphx 2024-06-09 18:31:57 +07:00
parent ebb4d3c141
commit 00ebb3f672

View File

@ -35,12 +35,12 @@ export function patchVideoApi() {
return nativePlay.apply(this); return nativePlay.apply(this);
} }
if (!!this.src) { const $parent = this.parentElement!!;
return nativePlay.apply(this); // Video tag is stream player
if (!this.src && $parent.dataset.testid === 'media-container') {
this.addEventListener('playing', showFunc);
} }
this.addEventListener('playing', showFunc);
return nativePlay.apply(this); return nativePlay.apply(this);
}; };
} }