YouTube Player API onReady not firing for www.youtube-nocookie.comiOS 8 Embedded YouTube in HTML web app failsEmbedded YouTube videos in HTML5 standalone app iOS 8.3 opening YouTube appHow to prevent a youtube iframe to redirect from Standalone App to Youtube App?How do I get a YouTube video thumbnail from the YouTube API?Youtube Iframe: onYouTubePlayerAPIReady() not calledHow I can remove the name of youtube Video in youtube javascript API?youtube player iframe embedVideo Ads not showing in YouTube HTML5 PlayerYoutube iframe API: OnReady not firing for Chrome extensionVB YouTube Player API in WebBrowser Contorol doesn't workHow to use YouTube IFRAME-Player in localhost html file?Showing YouTube videos in an iFrameYoutube embed API: “Uncaught DOMException”

Approximately how much travel time was saved by the opening of the Suez Canal in 1869?

How can I hide my bitcoin transactions to protect anonymity from others?

Can you tell me why doing scalar multiplication of a point on a Elliptic curve over a finite field gets to a point at infinity?

N.B. ligature in Latex

How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?

Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)

Type 1 Error & Type 2 Error's pregnancy test analogy: is it legit?

Motorized valve interfering with button?

Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?

Why are only specific transaction types accepted into the mempool?

What typically incentivizes a professor to change jobs to a lower ranking university?

If I cast Expeditious Retreat, can I Dash as a bonus action on the same turn?

Today is the Center

declaring a variable twice in IIFE

How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?

Infinite past with a beginning?

Is the month field really deprecated?

How do we improve the relationship with a client software team that performs poorly and is becoming less collaborative?

Writing rule which states that two causes for the same superpower is bad writing

Suffixes -unt and -ut-

If Manufacturer spice model and Datasheet give different values which should I use?

strToHex ( string to its hex representation as string)

GPS Rollover on Android Smartphones

Why linear maps act like matrix multiplication?



YouTube Player API onReady not firing for www.youtube-nocookie.com


iOS 8 Embedded YouTube in HTML web app failsEmbedded YouTube videos in HTML5 standalone app iOS 8.3 opening YouTube appHow to prevent a youtube iframe to redirect from Standalone App to Youtube App?How do I get a YouTube video thumbnail from the YouTube API?Youtube Iframe: onYouTubePlayerAPIReady() not calledHow I can remove the name of youtube Video in youtube javascript API?youtube player iframe embedVideo Ads not showing in YouTube HTML5 PlayerYoutube iframe API: OnReady not firing for Chrome extensionVB YouTube Player API in WebBrowser Contorol doesn't workHow to use YouTube IFRAME-Player in localhost html file?Showing YouTube videos in an iFrameYoutube embed API: “Uncaught DOMException”






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I'm having trouble with the YouTube Player API Reference for iframe Embeds...



Specifically with using http://www.youtube-nocookie.com

(necessary for iOS to allow embeds to play in Safari)



the onPlayerReady function in the demo is not called for for http://www.youtube-nocookie.com
(works fine for http://www.youtube.com)



See steps to reproduce below




Step 1:
Use the standard api demo:
(copy the code found at the link below)
https://developers.google.com/youtube/iframe_api_reference#Getting_Started



---> works fine



- Step 2:
as instructed in https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player



change



<div id="player"></div>


to (in the demo from Step 1)



<iframe id="player" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/M7lc1UVf-VE?enablejsapi=1&origin=http://example.com" frameborder="0"></iframe>


(make sure to change origin=http://example.com to your domain)



---> works fine



- Step 3:
in the iframe tag added in the last step,
change



src="http://www.youtube.com/embed/...


to



src="http://www.youtube-nocookie.com/embed/...


---> now the onPlayerReady function is never called



Note: as far as I can tell, this used to work until a few weeks ago...










share|improve this question






















  • Where are you seeing the piece in the documentation provided for the 'nocookie' url? AFAIK there's no restriction on youtube embeds in safari or chrome for ios. Can you provide the specific iframe embed you are using? My first thought is it might be a protocol mismatch.

    – twill
    Apr 7 '16 at 15:17












  • No restriction in iOS, but without youtube-nocookie in the url, the video currently won't play in the browser, but instead opens the youtube app and plays there instead. Search for "nocookie" in the following pages: stackoverflow.com/questions/29794859/… stackoverflow.com/questions/30263003/… stackoverflow.com/questions/25972600/…

    – vitabot1
    Apr 7 '16 at 16:44












  • The embed is exactly as described in steps 1&2

    – vitabot1
    Apr 7 '16 at 16:53











  • What happens if you replace your iframe code with the following: <iframe width="700" height="394" src="//www.youtube-nocookie.com/embed/xspoREpBOhY?rel=0" frameborder="0" allowfullscreen></iframe>

    – twill
    Apr 7 '16 at 17:29











  • No change... The video is displayed, and if you click play, it plays. The problem is that the api is not activating. (the onPlayerReady function is never called)

    – vitabot1
    Apr 7 '16 at 19:12

















1















I'm having trouble with the YouTube Player API Reference for iframe Embeds...



Specifically with using http://www.youtube-nocookie.com

(necessary for iOS to allow embeds to play in Safari)



the onPlayerReady function in the demo is not called for for http://www.youtube-nocookie.com
(works fine for http://www.youtube.com)



See steps to reproduce below




Step 1:
Use the standard api demo:
(copy the code found at the link below)
https://developers.google.com/youtube/iframe_api_reference#Getting_Started



---> works fine



- Step 2:
as instructed in https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player



change



<div id="player"></div>


to (in the demo from Step 1)



<iframe id="player" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/M7lc1UVf-VE?enablejsapi=1&origin=http://example.com" frameborder="0"></iframe>


(make sure to change origin=http://example.com to your domain)



---> works fine



- Step 3:
in the iframe tag added in the last step,
change



src="http://www.youtube.com/embed/...


to



src="http://www.youtube-nocookie.com/embed/...


---> now the onPlayerReady function is never called



Note: as far as I can tell, this used to work until a few weeks ago...










share|improve this question






















  • Where are you seeing the piece in the documentation provided for the 'nocookie' url? AFAIK there's no restriction on youtube embeds in safari or chrome for ios. Can you provide the specific iframe embed you are using? My first thought is it might be a protocol mismatch.

    – twill
    Apr 7 '16 at 15:17












  • No restriction in iOS, but without youtube-nocookie in the url, the video currently won't play in the browser, but instead opens the youtube app and plays there instead. Search for "nocookie" in the following pages: stackoverflow.com/questions/29794859/… stackoverflow.com/questions/30263003/… stackoverflow.com/questions/25972600/…

    – vitabot1
    Apr 7 '16 at 16:44












  • The embed is exactly as described in steps 1&2

    – vitabot1
    Apr 7 '16 at 16:53











  • What happens if you replace your iframe code with the following: <iframe width="700" height="394" src="//www.youtube-nocookie.com/embed/xspoREpBOhY?rel=0" frameborder="0" allowfullscreen></iframe>

    – twill
    Apr 7 '16 at 17:29











  • No change... The video is displayed, and if you click play, it plays. The problem is that the api is not activating. (the onPlayerReady function is never called)

    – vitabot1
    Apr 7 '16 at 19:12













1












1








1


1






I'm having trouble with the YouTube Player API Reference for iframe Embeds...



Specifically with using http://www.youtube-nocookie.com

(necessary for iOS to allow embeds to play in Safari)



the onPlayerReady function in the demo is not called for for http://www.youtube-nocookie.com
(works fine for http://www.youtube.com)



See steps to reproduce below




Step 1:
Use the standard api demo:
(copy the code found at the link below)
https://developers.google.com/youtube/iframe_api_reference#Getting_Started



---> works fine



- Step 2:
as instructed in https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player



change



<div id="player"></div>


to (in the demo from Step 1)



<iframe id="player" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/M7lc1UVf-VE?enablejsapi=1&origin=http://example.com" frameborder="0"></iframe>


(make sure to change origin=http://example.com to your domain)



---> works fine



- Step 3:
in the iframe tag added in the last step,
change



src="http://www.youtube.com/embed/...


to



src="http://www.youtube-nocookie.com/embed/...


---> now the onPlayerReady function is never called



Note: as far as I can tell, this used to work until a few weeks ago...










share|improve this question














I'm having trouble with the YouTube Player API Reference for iframe Embeds...



Specifically with using http://www.youtube-nocookie.com

(necessary for iOS to allow embeds to play in Safari)



the onPlayerReady function in the demo is not called for for http://www.youtube-nocookie.com
(works fine for http://www.youtube.com)



See steps to reproduce below




Step 1:
Use the standard api demo:
(copy the code found at the link below)
https://developers.google.com/youtube/iframe_api_reference#Getting_Started



---> works fine



- Step 2:
as instructed in https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player



change



<div id="player"></div>


to (in the demo from Step 1)



<iframe id="player" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/M7lc1UVf-VE?enablejsapi=1&origin=http://example.com" frameborder="0"></iframe>


(make sure to change origin=http://example.com to your domain)



---> works fine



- Step 3:
in the iframe tag added in the last step,
change



src="http://www.youtube.com/embed/...


to



src="http://www.youtube-nocookie.com/embed/...


---> now the onPlayerReady function is never called



Note: as far as I can tell, this used to work until a few weeks ago...







javascript iframe youtube






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 7 '16 at 15:06









vitabot1vitabot1

184




184












  • Where are you seeing the piece in the documentation provided for the 'nocookie' url? AFAIK there's no restriction on youtube embeds in safari or chrome for ios. Can you provide the specific iframe embed you are using? My first thought is it might be a protocol mismatch.

    – twill
    Apr 7 '16 at 15:17












  • No restriction in iOS, but without youtube-nocookie in the url, the video currently won't play in the browser, but instead opens the youtube app and plays there instead. Search for "nocookie" in the following pages: stackoverflow.com/questions/29794859/… stackoverflow.com/questions/30263003/… stackoverflow.com/questions/25972600/…

    – vitabot1
    Apr 7 '16 at 16:44












  • The embed is exactly as described in steps 1&2

    – vitabot1
    Apr 7 '16 at 16:53











  • What happens if you replace your iframe code with the following: <iframe width="700" height="394" src="//www.youtube-nocookie.com/embed/xspoREpBOhY?rel=0" frameborder="0" allowfullscreen></iframe>

    – twill
    Apr 7 '16 at 17:29











  • No change... The video is displayed, and if you click play, it plays. The problem is that the api is not activating. (the onPlayerReady function is never called)

    – vitabot1
    Apr 7 '16 at 19:12

















  • Where are you seeing the piece in the documentation provided for the 'nocookie' url? AFAIK there's no restriction on youtube embeds in safari or chrome for ios. Can you provide the specific iframe embed you are using? My first thought is it might be a protocol mismatch.

    – twill
    Apr 7 '16 at 15:17












  • No restriction in iOS, but without youtube-nocookie in the url, the video currently won't play in the browser, but instead opens the youtube app and plays there instead. Search for "nocookie" in the following pages: stackoverflow.com/questions/29794859/… stackoverflow.com/questions/30263003/… stackoverflow.com/questions/25972600/…

    – vitabot1
    Apr 7 '16 at 16:44












  • The embed is exactly as described in steps 1&2

    – vitabot1
    Apr 7 '16 at 16:53











  • What happens if you replace your iframe code with the following: <iframe width="700" height="394" src="//www.youtube-nocookie.com/embed/xspoREpBOhY?rel=0" frameborder="0" allowfullscreen></iframe>

    – twill
    Apr 7 '16 at 17:29











  • No change... The video is displayed, and if you click play, it plays. The problem is that the api is not activating. (the onPlayerReady function is never called)

    – vitabot1
    Apr 7 '16 at 19:12
















Where are you seeing the piece in the documentation provided for the 'nocookie' url? AFAIK there's no restriction on youtube embeds in safari or chrome for ios. Can you provide the specific iframe embed you are using? My first thought is it might be a protocol mismatch.

– twill
Apr 7 '16 at 15:17






Where are you seeing the piece in the documentation provided for the 'nocookie' url? AFAIK there's no restriction on youtube embeds in safari or chrome for ios. Can you provide the specific iframe embed you are using? My first thought is it might be a protocol mismatch.

– twill
Apr 7 '16 at 15:17














No restriction in iOS, but without youtube-nocookie in the url, the video currently won't play in the browser, but instead opens the youtube app and plays there instead. Search for "nocookie" in the following pages: stackoverflow.com/questions/29794859/… stackoverflow.com/questions/30263003/… stackoverflow.com/questions/25972600/…

– vitabot1
Apr 7 '16 at 16:44






No restriction in iOS, but without youtube-nocookie in the url, the video currently won't play in the browser, but instead opens the youtube app and plays there instead. Search for "nocookie" in the following pages: stackoverflow.com/questions/29794859/… stackoverflow.com/questions/30263003/… stackoverflow.com/questions/25972600/…

– vitabot1
Apr 7 '16 at 16:44














The embed is exactly as described in steps 1&2

– vitabot1
Apr 7 '16 at 16:53





The embed is exactly as described in steps 1&2

– vitabot1
Apr 7 '16 at 16:53













What happens if you replace your iframe code with the following: <iframe width="700" height="394" src="//www.youtube-nocookie.com/embed/xspoREpBOhY?rel=0" frameborder="0" allowfullscreen></iframe>

– twill
Apr 7 '16 at 17:29





What happens if you replace your iframe code with the following: <iframe width="700" height="394" src="//www.youtube-nocookie.com/embed/xspoREpBOhY?rel=0" frameborder="0" allowfullscreen></iframe>

– twill
Apr 7 '16 at 17:29













No change... The video is displayed, and if you click play, it plays. The problem is that the api is not activating. (the onPlayerReady function is never called)

– vitabot1
Apr 7 '16 at 19:12





No change... The video is displayed, and if you click play, it plays. The problem is that the api is not activating. (the onPlayerReady function is never called)

– vitabot1
Apr 7 '16 at 19:12












3 Answers
3






active

oldest

votes


















1














I can fully confirm this issue. I've been using youtube-nocookie.com for more than a year and suddenly few weeks ago it stopped working. Normal youtube.com embeds work just fine.



It seems that this isn't just your problem, I guess it's problem on Google's side.






share|improve this answer























  • thanks for the confirmation. I've also reported the issue to google, but no response yet.

    – vitabot1
    Jun 7 '16 at 18:18











  • Same issue for me. I see that this issue was supposedly fixed in 2012, but now in 2018 the issue is back again! UGH groups.google.com/forum/#!topic/youtube-api-gdata/lscdyDrV0T0

    – Nigel Belham
    Apr 5 '18 at 18:45


















0














It seems like that the API works fine with youtube-noocookie.com. The following code works in JsFiddle, but does not work in StackOverflow editor.



window.onYouTubeIframeAPIReady = function() 
player = new YT.Player(document.getElementById('player'),
height: '390',
width: '640',
videoId: 'M7lc1UVf-VE',
host: 'https://www.youtube-nocookie.com',
events:
'onReady': function()
console.log('ready');
,
'onStateChange': function()
console.log('state change', arguments)


);


$.getScript("https://www.youtube.com/iframe_api");


<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<div id="player">

</div>







share|improve this answer






























    0














    window.onYouTubeIframeAPIReady = function() 
    player = new YT.Player(document.getElementById('player'),
    height: '390',
    width: '640',
    videoId: 'M7lc1UVf-VE',
    host: 'https://www.youtube-nocookie.com',
    events:
    'onReady': function()
    console.log('ready');
    ,
    'onStateChange': function()
    console.log('state change', arguments)


    );


    $.getScript("https://www.youtube.com/iframe_api");





    share|improve this answer




















    • 1





      It's better add some explanations to your code.

      – Tiw
      Mar 9 at 3:36











    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f36480181%2fyoutube-player-api-onready-not-firing-for-www-youtube-nocookie-com%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    I can fully confirm this issue. I've been using youtube-nocookie.com for more than a year and suddenly few weeks ago it stopped working. Normal youtube.com embeds work just fine.



    It seems that this isn't just your problem, I guess it's problem on Google's side.






    share|improve this answer























    • thanks for the confirmation. I've also reported the issue to google, but no response yet.

      – vitabot1
      Jun 7 '16 at 18:18











    • Same issue for me. I see that this issue was supposedly fixed in 2012, but now in 2018 the issue is back again! UGH groups.google.com/forum/#!topic/youtube-api-gdata/lscdyDrV0T0

      – Nigel Belham
      Apr 5 '18 at 18:45















    1














    I can fully confirm this issue. I've been using youtube-nocookie.com for more than a year and suddenly few weeks ago it stopped working. Normal youtube.com embeds work just fine.



    It seems that this isn't just your problem, I guess it's problem on Google's side.






    share|improve this answer























    • thanks for the confirmation. I've also reported the issue to google, but no response yet.

      – vitabot1
      Jun 7 '16 at 18:18











    • Same issue for me. I see that this issue was supposedly fixed in 2012, but now in 2018 the issue is back again! UGH groups.google.com/forum/#!topic/youtube-api-gdata/lscdyDrV0T0

      – Nigel Belham
      Apr 5 '18 at 18:45













    1












    1








    1







    I can fully confirm this issue. I've been using youtube-nocookie.com for more than a year and suddenly few weeks ago it stopped working. Normal youtube.com embeds work just fine.



    It seems that this isn't just your problem, I guess it's problem on Google's side.






    share|improve this answer













    I can fully confirm this issue. I've been using youtube-nocookie.com for more than a year and suddenly few weeks ago it stopped working. Normal youtube.com embeds work just fine.



    It seems that this isn't just your problem, I guess it's problem on Google's side.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Apr 20 '16 at 20:34









    Michal OberreiterMichal Oberreiter

    211




    211












    • thanks for the confirmation. I've also reported the issue to google, but no response yet.

      – vitabot1
      Jun 7 '16 at 18:18











    • Same issue for me. I see that this issue was supposedly fixed in 2012, but now in 2018 the issue is back again! UGH groups.google.com/forum/#!topic/youtube-api-gdata/lscdyDrV0T0

      – Nigel Belham
      Apr 5 '18 at 18:45

















    • thanks for the confirmation. I've also reported the issue to google, but no response yet.

      – vitabot1
      Jun 7 '16 at 18:18











    • Same issue for me. I see that this issue was supposedly fixed in 2012, but now in 2018 the issue is back again! UGH groups.google.com/forum/#!topic/youtube-api-gdata/lscdyDrV0T0

      – Nigel Belham
      Apr 5 '18 at 18:45
















    thanks for the confirmation. I've also reported the issue to google, but no response yet.

    – vitabot1
    Jun 7 '16 at 18:18





    thanks for the confirmation. I've also reported the issue to google, but no response yet.

    – vitabot1
    Jun 7 '16 at 18:18













    Same issue for me. I see that this issue was supposedly fixed in 2012, but now in 2018 the issue is back again! UGH groups.google.com/forum/#!topic/youtube-api-gdata/lscdyDrV0T0

    – Nigel Belham
    Apr 5 '18 at 18:45





    Same issue for me. I see that this issue was supposedly fixed in 2012, but now in 2018 the issue is back again! UGH groups.google.com/forum/#!topic/youtube-api-gdata/lscdyDrV0T0

    – Nigel Belham
    Apr 5 '18 at 18:45













    0














    It seems like that the API works fine with youtube-noocookie.com. The following code works in JsFiddle, but does not work in StackOverflow editor.



    window.onYouTubeIframeAPIReady = function() 
    player = new YT.Player(document.getElementById('player'),
    height: '390',
    width: '640',
    videoId: 'M7lc1UVf-VE',
    host: 'https://www.youtube-nocookie.com',
    events:
    'onReady': function()
    console.log('ready');
    ,
    'onStateChange': function()
    console.log('state change', arguments)


    );


    $.getScript("https://www.youtube.com/iframe_api");


    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <div id="player">

    </div>







    share|improve this answer



























      0














      It seems like that the API works fine with youtube-noocookie.com. The following code works in JsFiddle, but does not work in StackOverflow editor.



      window.onYouTubeIframeAPIReady = function() 
      player = new YT.Player(document.getElementById('player'),
      height: '390',
      width: '640',
      videoId: 'M7lc1UVf-VE',
      host: 'https://www.youtube-nocookie.com',
      events:
      'onReady': function()
      console.log('ready');
      ,
      'onStateChange': function()
      console.log('state change', arguments)


      );


      $.getScript("https://www.youtube.com/iframe_api");


      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
      <div id="player">

      </div>







      share|improve this answer

























        0












        0








        0







        It seems like that the API works fine with youtube-noocookie.com. The following code works in JsFiddle, but does not work in StackOverflow editor.



        window.onYouTubeIframeAPIReady = function() 
        player = new YT.Player(document.getElementById('player'),
        height: '390',
        width: '640',
        videoId: 'M7lc1UVf-VE',
        host: 'https://www.youtube-nocookie.com',
        events:
        'onReady': function()
        console.log('ready');
        ,
        'onStateChange': function()
        console.log('state change', arguments)


        );


        $.getScript("https://www.youtube.com/iframe_api");


        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
        <div id="player">

        </div>







        share|improve this answer













        It seems like that the API works fine with youtube-noocookie.com. The following code works in JsFiddle, but does not work in StackOverflow editor.



        window.onYouTubeIframeAPIReady = function() 
        player = new YT.Player(document.getElementById('player'),
        height: '390',
        width: '640',
        videoId: 'M7lc1UVf-VE',
        host: 'https://www.youtube-nocookie.com',
        events:
        'onReady': function()
        console.log('ready');
        ,
        'onStateChange': function()
        console.log('state change', arguments)


        );


        $.getScript("https://www.youtube.com/iframe_api");


        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
        <div id="player">

        </div>








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jun 11 '18 at 12:38









        Roland SoósRoland Soós

        1,13032037




        1,13032037





















            0














            window.onYouTubeIframeAPIReady = function() 
            player = new YT.Player(document.getElementById('player'),
            height: '390',
            width: '640',
            videoId: 'M7lc1UVf-VE',
            host: 'https://www.youtube-nocookie.com',
            events:
            'onReady': function()
            console.log('ready');
            ,
            'onStateChange': function()
            console.log('state change', arguments)


            );


            $.getScript("https://www.youtube.com/iframe_api");





            share|improve this answer




















            • 1





              It's better add some explanations to your code.

              – Tiw
              Mar 9 at 3:36















            0














            window.onYouTubeIframeAPIReady = function() 
            player = new YT.Player(document.getElementById('player'),
            height: '390',
            width: '640',
            videoId: 'M7lc1UVf-VE',
            host: 'https://www.youtube-nocookie.com',
            events:
            'onReady': function()
            console.log('ready');
            ,
            'onStateChange': function()
            console.log('state change', arguments)


            );


            $.getScript("https://www.youtube.com/iframe_api");





            share|improve this answer




















            • 1





              It's better add some explanations to your code.

              – Tiw
              Mar 9 at 3:36













            0












            0








            0







            window.onYouTubeIframeAPIReady = function() 
            player = new YT.Player(document.getElementById('player'),
            height: '390',
            width: '640',
            videoId: 'M7lc1UVf-VE',
            host: 'https://www.youtube-nocookie.com',
            events:
            'onReady': function()
            console.log('ready');
            ,
            'onStateChange': function()
            console.log('state change', arguments)


            );


            $.getScript("https://www.youtube.com/iframe_api");





            share|improve this answer















            window.onYouTubeIframeAPIReady = function() 
            player = new YT.Player(document.getElementById('player'),
            height: '390',
            width: '640',
            videoId: 'M7lc1UVf-VE',
            host: 'https://www.youtube-nocookie.com',
            events:
            'onReady': function()
            console.log('ready');
            ,
            'onStateChange': function()
            console.log('state change', arguments)


            );


            $.getScript("https://www.youtube.com/iframe_api");






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 9 at 3:35









            Tiw

            4,38961730




            4,38961730










            answered Mar 9 at 3:34









            nautao47 nautao47nautao47 nautao47

            1




            1







            • 1





              It's better add some explanations to your code.

              – Tiw
              Mar 9 at 3:36












            • 1





              It's better add some explanations to your code.

              – Tiw
              Mar 9 at 3:36







            1




            1





            It's better add some explanations to your code.

            – Tiw
            Mar 9 at 3:36





            It's better add some explanations to your code.

            – Tiw
            Mar 9 at 3:36

















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f36480181%2fyoutube-player-api-onready-not-firing-for-www-youtube-nocookie-com%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

            Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

            2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived