mirror of
https://github.com/algora-io/tv.git
synced 2025-02-04 01:53:25 +02:00
start youtube videos at second 1 or later to get a better thumbnail
This commit is contained in:
parent
2347cb4164
commit
9598fa3d28
@ -213,10 +213,19 @@ const Hooks = {
|
||||
return true;
|
||||
})();
|
||||
|
||||
const startTime = (() => {
|
||||
// TODO: remove this once vidstack youtube thumbnails at t=0 are fixed
|
||||
if (opts.player_type === "video/youtube") {
|
||||
return opts.current_time || 1;
|
||||
}
|
||||
|
||||
return opts.current_time;
|
||||
})();
|
||||
|
||||
this.player.autoplay = autoplay;
|
||||
this.player.poster = opts.poster;
|
||||
this.player.title = opts.title;
|
||||
this.player.currentTime = opts.current_time;
|
||||
this.player.currentTime = startTime;
|
||||
this.player.streamType = opts.is_live ? "ll-live:dvr" : "on-demand";
|
||||
this.player.src = opts.url;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user