1

I am trying to embed a Canon in D youtube music video into my html code, but it showed me an operation cancelled. Provided the embedded code is copied directly from the youtube embed code.

Youtube embed code:

    <iframe width="560" height="315" src="//www.youtube.com/embed/EW8XHKqz7Jg" frameborder="0" allowfullscreen></iframe>

Any Idea to help me? Note: Im using dreamweaver CC to embed this and the rest of the code in page is this

Html Page Code:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Personal Website</title>
<link rel="stylesheet" type="text/css" media="screen" href="WebMe.css">
</head>

<body>
<h1>The Other Side Of Me</h1>
    <div id="mainnav">
    <ul>    
        <li><a class="nav1" href="AboutMe.html">About Me</a></li>
        <li><a class="nav2" href="ShowCase.html">ShowCase</a></li>
        <li><a class="nav3" href="Hobby.html">Hobby</a></li>
        <li><a class="nav4" href="Contact.html">Contact</a></li>
    </ul>   
    </div>
<div id="bio">
        <h2 class="header">Hobby</h2>
        <p class="concenter">One of my hobby is playing music, below is one of my favourite piano piece</p>
        <figure id="showpic"><img src="image/Canon1.png" class="Fleft" width="300" height="500" alt="canon1"/></figure>
        <figure id="showpic"><img src="image/Canon2.png" width="300" height="500" alt="Canon2"/></figure>
        <p class="concenter">Canon in video varies from music sheet</p>
        <iframe width="560" height="315" src="//www.youtube.com/embed/EW8XHKqz7Jg" frameborder="0" allowfullscreen></iframe>
    </div>
</body>
</html>

2 Answers2

2

I wanted to clarify that actually the "//" method will load external resources on the protocol that YOU are viewing the page on.

If you are viewing your own webpage on https, it will load the external URL on https.

If you load your webpage on http, it'll load youtube on http.

Regarding your actual problem, this stackoverflow post seems to cover your problem in more detail: What does status=canceled for a resource mean in Chrome Developer Tools?

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
joep
  • 258
  • 3
  • 11
-1

I don't know why embed leaves out the http:// part from the generated code. It should be

<iframe width="560" height="315" src="http://www.youtube.com/embed/EW8XHKqz7Jg" frameborder="0" allowfullscreen></iframe>
Muteking
  • 1,465
  • 5
  • 18
  • 31