]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/peertube-player.ts
Fix updating video tags to empty field
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / peertube-player.ts
index 4ae3e71bda4802d655f86666345f1709034ec298..f419d58fc723528673788fc91bc96877d04367a2 100644 (file)
@@ -1,7 +1,7 @@
 import { VideoFile } from '../../../../shared/models/videos'
 
 import 'videojs-hotkeys'
-import 'videojs-dock/dist/videojs-dock.es.js'
+import 'videojs-dock'
 import './peertube-link-button'
 import './resolution-menu-button'
 import './settings-menu-button'
@@ -20,19 +20,24 @@ function getVideojsOptions (options: {
   videoFiles: VideoFile[],
   enableHotkeys: boolean,
   inactivityTimeout: number,
-  peertubeLink: boolean
+  peertubeLink: boolean,
+  poster: string,
+  startTime: number
 }) {
   const videojsOptions = {
     controls: true,
-    autoplay: options.autoplay,
+    poster: options.poster,
+    autoplay: false,
     inactivityTimeout: options.inactivityTimeout,
     playbackRates: [ 0.5, 1, 1.5, 2 ],
     plugins: {
       peertube: {
+        autoplay: options.autoplay, // Use peertube plugin autoplay because we get the file by webtorrent
         videoFiles: options.videoFiles,
         playerElement: options.playerElement,
         videoViewUrl: options.videoViewUrl,
-        videoDuration: options.videoDuration
+        videoDuration: options.videoDuration,
+        startTime: options.startTime
       }
     },
     controlBar: {