diff --git a/src/controller/buffer-controller.ts b/src/controller/buffer-controller.ts index f2c3341eda2..4060903f695 100755 --- a/src/controller/buffer-controller.ts +++ b/src/controller/buffer-controller.ts @@ -1197,5 +1197,5 @@ function addSource(media: HTMLMediaElement, url: string) { } function getSourceChild(media: HTMLMediaElement): HTMLSourceElement | null { - return media.querySelector('source'); + return media.querySelector?.('source'); }