Map source

This commit is contained in:
2025-10-04 17:24:27 +02:00
parent 937d34d73e
commit b2cf9d63f1

View File

@@ -23,6 +23,7 @@ class VideoPlayer extends VideoPlayerEvents implements VideoPlayerBase {
super(new WebEventEmiter(video)); super(new WebEventEmiter(video));
this.video = video; this.video = video;
this.player.attach(this.video); this.player.attach(this.video);
this.replaceSourceAsync(source);
} }
/** /**
@@ -229,11 +230,10 @@ class VideoPlayer extends VideoPlayerEvents implements VideoPlayerBase {
| NoAutocomplete<VideoPlayerSource> | NoAutocomplete<VideoPlayerSource>
| null, | null,
): Promise<void> { ): Promise<void> {
await this.wrapPromise( this.video.src =
this.player.replaceSourceAsync( typeof source === "object" && "uri" in source
source === null ? null : createSource(source), ? source.uri
), : source;
);
} }
// Text Track Management // Text Track Management