diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-03 15:11:46 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-03 15:18:24 +0200 |
commit | 33d7855229f45d73a767566f1dbcb87709211ebf (patch) | |
tree | 103fa08e917fa64ba000bae7e2fd7255ba294a0e /client/src/standalone/videos | |
parent | c6352f2c64f3c1ad54f8500f493587cdce3d33c9 (diff) | |
download | PeerTube-33d7855229f45d73a767566f1dbcb87709211ebf.tar.gz PeerTube-33d7855229f45d73a767566f1dbcb87709211ebf.tar.zst PeerTube-33d7855229f45d73a767566f1dbcb87709211ebf.zip |
Improve first play
Diffstat (limited to 'client/src/standalone/videos')
-rw-r--r-- | client/src/standalone/videos/embed.scss | 1 | ||||
-rw-r--r-- | client/src/standalone/videos/embed.ts | 5 |
2 files changed, 3 insertions, 3 deletions
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 { | |||
12 | html, body { | 12 | html, body { |
13 | height: 100%; | 13 | height: 100%; |
14 | margin: 0; | 14 | margin: 0; |
15 | background-color: #000; | ||
15 | } | 16 | } |
16 | 17 | ||
17 | .video-js.vjs-peertube-skin { | 18 | .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) | |||
22 | const videoContainerId = 'video-container' | 22 | const videoContainerId = 'video-container' |
23 | 23 | ||
24 | const videoElement = document.getElementById(videoContainerId) as HTMLVideoElement | 24 | const videoElement = document.getElementById(videoContainerId) as HTMLVideoElement |
25 | videoElement.poster = window.location.origin + videoInfo.previewPath | ||
26 | |||
27 | let autoplay = false | 25 | let autoplay = false |
28 | 26 | ||
29 | try { | 27 | try { |
@@ -41,7 +39,8 @@ loadVideoInfo(videoId) | |||
41 | videoFiles: videoInfo.files, | 39 | videoFiles: videoInfo.files, |
42 | videoDuration: videoInfo.duration, | 40 | videoDuration: videoInfo.duration, |
43 | enableHotkeys: true, | 41 | enableHotkeys: true, |
44 | peertubeLink: true | 42 | peertubeLink: true, |
43 | poster: window.location.origin + videoInfo.previewPath | ||
45 | }) | 44 | }) |
46 | videojs(videoContainerId, videojsOptions, function () { | 45 | videojs(videoContainerId, videojsOptions, function () { |
47 | const player = this | 46 | const player = this |