Skip to content

Commit

Permalink
remove getSourceChild function
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonatangcavalcanti committed Aug 5, 2024
1 parent 0013621 commit 13301b4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/controller/buffer-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ export default class BufferController implements ComponentAPI {

private get mediaSrc(): string | undefined {
if (!this.media) return undefined;
const media = getSourceChild(this.media) || this.media;
const media = this.media.querySelector?.('source') || this.media;
return media.src;
}

Expand Down Expand Up @@ -1195,7 +1195,3 @@ function addSource(media: HTMLMediaElement, url: string) {
source.src = url;
media.appendChild(source);
}

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

0 comments on commit 13301b4

Please sign in to comment.