pupunzi / jquery.mb.YTPlayer

use a custom yutube player for a video as background on jQuery framework
https://pupunzi.com/mb.components/mb.YTPlayer/demo/demo.html
1.3k stars 431 forks source link

Having several problems with inclusion #361

Closed heohni closed 6 years ago

heohni commented 6 years ago

Hi, I added js version from 13-04-2018

And call it like this: var videos = [ {videoURL: "eygDwQeLEw4", containment: '.youtube-bg', mute: true, loop: false, ratio:'auto', quality:'large', autoPlay:true}, {videoURL: "uFQJ5DPt6Bc", containment: '.youtube-bg', mute: true, loop: false, ratio:'auto', quality:'large', autoPlay:true}, {videoURL: "KXEgRb4o7HU", containment: '.youtube-bg', mute: true, loop: false, ratio:'auto', quality:'large', autoPlay:true} ]; $(".youtube-bg").YTPlaylist(videos, true);

The following issues:

  1. Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘https://www.youtube.com’) does not match the recipient window’s origin (‘http://localhost’). I also get the same message on the live system with real domain.

  2. video ID:: uFQJ5DPt6Bc: The owner of the requested video does not allow it to be played in embedded players (what special setting I have to make within youtube?)

  3. Videos does not start by default. No autoplay. I have to click the video to start

pupunzi commented 6 years ago

Hi,

  1. The first is a known Youtube API issue and it's not blocking. Anyway, the target should be HTTPS but it has no solution at the time.

  2. The video on Youtube should be public and the embed option should not have limitations. Go to the Advanced settings of the video to set them: youtube-settings

  3. With the latest Youtube policy, the video must be muted to allow autoplay.

heohni commented 6 years ago

Wow! Such a quick response!! THANKS!!

About the autoplay – do you mean the setting has to have

mute: false

Or, do you mean the video itself should have no sound?

Or is there any mute setting I have to check?

Von: "jquery.mb.components" notifications@github.com Antworten an: "pupunzi/jquery.mb.YTPlayer" reply@reply.github.com Datum: Montag, 4. Juni 2018 um 11:24 An: "pupunzi/jquery.mb.YTPlayer" jquery.mb.YTPlayer@noreply.github.com Cc: Heidi Schlautmann Heidi.Schlautmann@consultingteam.de, Author author@noreply.github.com Betreff: Re: [pupunzi/jquery.mb.YTPlayer] Having several problems withinclusion (#361)

Hi,

  1. The first is a known Youtube API issue and it's not blocking. Anyway, the target should be HTTPS but it has no solution at the time.

  2. The video on Youtube should be public and the embed option should not have limitations. Go to the Advanced settings of the video to set them: [youtube-settings]https://user-images.githubusercontent.com/56659/40909321-954117ae-67e9-11e8-9c90-3480d2b040ab.png

  3. With the latest Youtube policy, the video must be muted to allow autoplay.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/pupunzi/jquery..mb.YTPlayer/issues/361#issuecomment-394290814, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEJPBXYSkY_dk7mZaMIrPR9uAaC0Ioz_ks5t5PzLgaJpZM4UYuAT. {"@context":"http://schema.org","@type":"EmailMessage","potentialAction":{"@type":"ViewAction","target":"https://github.com/pupunzi/jquery.mb.YTPlayer/issues/361#issuecomment-394290814","url":"https://github.com/pupunzi/jquery.mb.YTPlayer/issues/361#issuecomment-394290814","name":"View Issue"},"descript-blockedion":"View this Issue on GitHub","publisher":{"@type":"Organization","name":"GitHub","url":"https://github.com"}} {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/pupunzi/jquery.mb.YTPlayer","title":"pupunzi/jquery.mb.YTPlayer","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/pupunzi/jquery.mb.YTPlayer"}},"updates":{"snippets":[{"icon":"PERSON","message":"@pupunzi in #361: Hi,\r\n\r\n1. The first is a known Youtube API issue and it's not blocking. Anyway, the target should be HTTPS but it has no solution at the time.\r\n\r\n2. The video on Youtube should be public and the embed option should not have limitations. Go to the Advanced settings of the video to set them:\r\nyoutube-settings\r\n\r\n3. With the latest Youtube policy, the video must be muted to allow autoplay. \r\n\r\n"}],"action":{"name":"View Issue","url":"https://github.com/pupunzi/jquery.mb.YTPlayer/issues/361#issuecomment-394290814"}}} { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "37567f93-e2a7-4e2a-ad37-a9160fc62647", "title": "Re: [pupunzi/jquery.mb.YTPlayer] Having several problems with inclusion (#361)", "sections": [ { "text": "", "activityTitle": "jquery.mb.components", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@pupunzi", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"pupunzi/jquery.mb.YTPlayer\",\n\"issueId\": 361,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "targets": [ { "os": "default", "uri": "https://github.com/pupunzi/jquery.mb.YTPlayer/issues/361#issuecomment-394290814" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 342024211\n}" } ], "themeColor": "26292E" }

pupunzi commented 6 years ago

About the autoplay – do you mean the setting has to have mute: false

the mute should be set as TRUE; video must be mute to let autoPlay perform correctly.