diff --git a/src/controller/buffer-controller.ts b/src/controller/buffer-controller.ts index b9cfa7cb9c8..eb6ff1b0c0c 100755 --- a/src/controller/buffer-controller.ts +++ b/src/controller/buffer-controller.ts @@ -1026,8 +1026,7 @@ export default class BufferController implements ComponentAPI { }; private get mediaSrc(): string | undefined { - const media = - (this.media?.firstChild as HTMLSourceElement | null) || this.media; + const media = this.media?.querySelector?.('source') || this.media; return media?.src; }