From 0d29c782297995ed926ecd29a99865226e82b361 Mon Sep 17 00:00:00 2001 From: Jhonatan Cavalcanti Date: Mon, 5 Aug 2024 15:06:59 -0300 Subject: [PATCH] Fix access of media src value with non-source children (#6611) --- src/controller/buffer-controller.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; }