]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/peertube-player-manager.ts
Don't force autoplay
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / peertube-player-manager.ts
index 4e6387a5383f364b9b413af14159ba02b0dabef6..8e6a4f139c8f9cbedbdea91d8a2d0e0fa42e6727 100644 (file)
@@ -211,9 +211,9 @@ export class PeertubePlayerManager {
     }
 
     if (mode === 'p2p-media-loader') {
-      const { streamrootHls } = PeertubePlayerManager.addP2PMediaLoaderOptions(plugins, options, p2pMediaLoaderModule)
+      const { hlsjs } = PeertubePlayerManager.addP2PMediaLoaderOptions(plugins, options, p2pMediaLoaderModule)
 
-      html5 = streamrootHls.html5
+      html5 = hlsjs.html5
     }
 
     if (mode === 'webtorrent') {
@@ -236,7 +236,7 @@ export class PeertubePlayerManager {
         : undefined, // Undefined so the player knows it has to check the local storage
 
       autoplay: autoplay === true
-        ? 'any' // Use 'any' instead of true to get notifier by videojs if autoplay fails
+        ? 'play' // Use 'any' instead of true to get notifier by videojs if autoplay fails
         : autoplay,
 
       poster: commonOptions.poster,
@@ -303,7 +303,7 @@ export class PeertubePlayerManager {
         swarmId: p2pMediaLoaderOptions.playlistUrl
       }
     }
-    const streamrootHls = {
+    const hlsjs = {
       levelLabelHandler: (level: { height: number, width: number }) => {
         const file = p2pMediaLoaderOptions.videoFiles.find(f => f.resolution.id === level.height)
 
@@ -322,7 +322,7 @@ export class PeertubePlayerManager {
       }
     }
 
-    const toAssign = { p2pMediaLoader, streamrootHls }
+    const toAssign = { p2pMediaLoader, hlsjs }
     Object.assign(plugins, toAssign)
 
     return toAssign