]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/utils.ts
Merge branch 'release/2.1.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / utils.ts
index 777abb568efe89fd46940e35a1b04c3e7d19b98f..fa902e1f1822dd3a7d18f76b7c26fedd3c0cf3ce 100644 (file)
@@ -51,6 +51,9 @@ function buildVideoLink (options: {
     : window.location.origin + window.location.pathname.replace('/embed/', '/watch/')
 
   const params = new URLSearchParams(window.location.search)
+  // 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)
@@ -122,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>'