]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/utils.ts
Fix saved mute in embed
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / utils.ts
index 629634985b16d846d771e01d7302a8c17aef6b72..fa902e1f1822dd3a7d18f76b7c26fedd3c0cf3ce 100644 (file)
@@ -51,8 +51,9 @@ function buildVideoLink (options: {
     : window.location.origin + window.location.pathname.replace('/embed/', '/watch/')
 
   const params = new URLSearchParams(window.location.search)
-  // Remove this unused parameter when we are on a playlist page
+  // Remove these unused parameters when we are on a playlist page
   params.delete('videoId')
+  params.delete('resume')
 
   if (options.startTime) {
     const startTimeInt = Math.floor(options.startTime)
@@ -124,7 +125,7 @@ function secondsToTime (seconds: number, full = false, symbol?: string) {
 
 function buildVideoEmbed (embedUrl: string) {
   return '<iframe width="560" height="315" ' +
-    'sandbox="allow-same-origin allow-scripts" ' +
+    'sandbox="allow-same-origin allow-scripts allow-popups" ' +
     'src="' + embedUrl + '" ' +
     'frameborder="0" allowfullscreen>' +
     '</iframe>'