Skip to content

Commit

Permalink
improve the compatibility of mediaSrc value access
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonatangcavalcanti committed Aug 4, 2024
1 parent cd98207 commit 0013621
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controller/buffer-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1197,5 +1197,5 @@ function addSource(media: HTMLMediaElement, url: string) {
}

function getSourceChild(media: HTMLMediaElement): HTMLSourceElement | null {
return media.querySelector('source');
return media.querySelector?.('source');
}

0 comments on commit 0013621

Please sign in to comment.