From 33d7855229f45d73a767566f1dbcb87709211ebf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 3 Apr 2018 15:11:46 +0200 Subject: Improve first play --- client/src/standalone/videos/embed.scss | 1 + client/src/standalone/videos/embed.ts | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'client/src/standalone') diff --git a/client/src/standalone/videos/embed.scss b/client/src/standalone/videos/embed.scss index b015c6736..fc7135d64 100644 --- a/client/src/standalone/videos/embed.scss +++ b/client/src/standalone/videos/embed.scss @@ -12,6 +12,7 @@ video { html, body { height: 100%; margin: 0; + background-color: #000; } .video-js.vjs-peertube-skin { diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index f2ac5dca6..1efecd3f3 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts @@ -22,8 +22,6 @@ loadVideoInfo(videoId) const videoContainerId = 'video-container' const videoElement = document.getElementById(videoContainerId) as HTMLVideoElement - videoElement.poster = window.location.origin + videoInfo.previewPath - let autoplay = false try { @@ -41,7 +39,8 @@ loadVideoInfo(videoId) videoFiles: videoInfo.files, videoDuration: videoInfo.duration, enableHotkeys: true, - peertubeLink: true + peertubeLink: true, + poster: window.location.origin + videoInfo.previewPath }) videojs(videoContainerId, videojsOptions, function () { const player = this -- cgit v1.2.3