FIX: Add lazy-videos support for Vimeo unlisted videos (#20916)

This commit is contained in:
Jan Cernik
2023-04-03 22:49:32 -03:00
committed by GitHub
parent aeeb6726d8
commit b4096f4636
5 changed files with 2794 additions and 4 deletions

View File

@ -6,7 +6,9 @@ export default class LazyVideo extends Component {
case "youtube":
return `https://www.youtube.com/embed/${this.args.videoId}?autoplay=1`;
case "vimeo":
return `https://player.vimeo.com/video/${this.args.videoId}?autoplay=1`;
return `https://player.vimeo.com/video/${this.args.videoId}${
this.args.videoId.includes("?") ? "&" : "?"
}autoplay=1`;
case "tiktok":
return `https://www.tiktok.com/embed/v2/${this.args.videoId}`;
}