Link to home
Start Free TrialLog in
Avatar of DS928
DS928Flag for United States of America

asked on

You Tube Videos not playing

I have a You Tube Channel.  I am trying to play videos on my website from the channel.  They are not playing.

http://www.schuremediagroup.com/youtube.html 

<div class="player">
			<video id="vid1"
		         class="video-js vjs-default-skin"
		         controls
		         preload="auto"
		         width="600"
		         height="338"
		         poster="images/video_gallery/poster1.jpg"
		         data-setup='{
		           "playlist":[
		              {"thumb_url":"images/video_gallery/thumb1.jpg",
		               "poster_url":"",
		               "sources":[
		                 {"src":"https://youtu.be/gXtTXkasDBE",
		                  "type":"",
		                  "media":"",
		                  "title":"Formation"},
		                 {"src":"https://youtu.be/gXtTXkasDBE",
		                  "type":"video/mp4",
		                  "media":"",
		                  "title":""
		              	 }
		               ]
		              },

Open in new window

Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

I don't think YouTube likes the <video> tag.  Most recommendations I've seen suggest using an iFrame.  But you can also use an Object tag, like this:
http://iconoun.com/demo/temp_ds928.php
<?php // demo/temp_ds928.php
/**
 * https://www.experts-exchange.com/questions/28938750/You-Tube-Videos-not-playing.html
 *
 * http://www.w3schools.com/tags/tag_video.asp
 * http://www.w3schools.com/html/html5_video.asp
 * https://www.youtube.com/watch?v=ZnuwB35GYMY
 * https://support.google.com/youtube/answer/171780?hl=en
 */
?>
<!doctype html>
<head>
<meta charset="utf-8">
<title>demo/temp_ds928.php</title>
</head>

<body>

<object height="350" width="425">
  <param name="movie" value="http://www.youtube.com/v/gXtTXkasDBE&autoplay=1" />
  <embed height="350" src="http://www.youtube.com/v/gXtTXkasDBE&autoplay=1" type="application/x-shockwave-flash" width="425">
  </embed>
</object>

</body>
</html>

Open in new window

SOLUTION
Avatar of William Fulks
William Fulks
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DS928

ASKER

Is there a way around the Private issue?  I dont want them public?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DS928

ASKER

Thank you Ray.  This was the way to go.  It's slower but it works.
So I don't get any points even though I identified the problem related to your original question?
Also, you should know that hosting your own videos does not make them private. With the right software people can copy the videos off YouTube just as easily as they could from your site or anywhere else. If you want to keep them somewhat private, then put them on some kind of secured page that requires a login. Even then, those that login could still copy the video.
Avatar of DS928

ASKER

Ok I will give you some points but I do not know how.
I think there is an assisted solution button or something like that next to my comment.