tmighty
tmighty

Reputation: 11399

YouTube video in iFrame only locally visible

I have embedded a YouTube video in my website like this:

              <h2>Some YouTube video:</h2>
              <br>
              <div style="text-align:center">
                 <iframe width="420" height="315" src="http://www.youtube.com/embed/zN7VPRoLlzw" frameborder="0" allowfullscreen></iframe><br><br>
                 <div id="videotip">
                    <span class="mini"><br>
                    <img src="../images/tipp.png" alt="" title="" />
                    SomeText
                    <br><br>
                    </span>
                 </div>
              </div>

When I view the htm file locally in my browser, the YouTube video shows up. However, when I upload the htm file to my webserver and view it, the video area is blank.

Does anybody see which mistake I might have made?

Upvotes: 1

Views: 197

Answers (1)

Alaa
Alaa

Reputation: 300

I used this code and it worked for me:

<h2>Some YouTube video:</h2>
          <br>
          <div style="text-align:center">
             <iframe width="420" height="315" src="https://www.youtube.com/embed/zN7VPRoLlzw?ecver=2" frameborder="0" allowfullscreen></iframe><br><br>
             <div id="videotip">
                <span class="mini"><br>
                <img src="../images/tipp.png" alt="" title="" />
                SomeText
                <br><br>
                </span>
             </div>
          </div>

as you see I did not change anything but the src link, I right click on the video I selected copy embed code and then replace the link in src with it Hope this helped (:

Upvotes: 1

Related Questions