Can anyone suggest how I embed a youtube channel into a webpage - I am getting conflicting information from various sites, ideally using the custom player if possible? thanks
问题:
回答1:
YouTube supports a fairly easy to use iframe and url interface to embed videos, playlists and all user uploads to your channel: https://developers.google.com/youtube/player_parameters
For example this HTML will embed a player loaded with a playlist of all the videos uploaded to your channel. Replace YOURCHANNELNAME with the actual name of your channel:
<iframe src="http://www.youtube.com/embed/?listType=user_uploads&list=YOURCHANNELNAME" width="480" height="400"></iframe>
回答2:
In order to embed your channel, all you need to do is copy then paste the following code in another web-page.
<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&up_channel=YourChannelName&synd=open&w=320&h=390&title=&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>
Make sure to replace the YourChannelName with your actual channel name.
For example: if your channel name were CaliChick94066 your channel embed code would be:
<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&up_channel=CaliChick94066&synd=open&w=320&h=390&title=&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>
Please look at the following links:
YouTube on your site
Embed YouTube Channel
You just have to name the URL to your channel name. Also you can play with the height and the border color and size. Hope it helps
回答3:
Except that YTchannelembed doesn't actually embed the channel, merely linked thumbnails, all of which lead off-site. The Youmax solution for jQuery does actually embed though: http://www.codehandling.com/2013/03/youmax-20-complete-youtube-channel-on.html
回答4:
I quickly did this for anyone else coming onto this page:
<object width="425" height="344">
<param name="movie" value="http://www.youtube.com/v/u1zgFlCw8Aw?fs=1"</param>
<param name="allowFullScreen" value="true"></param>
<param name="allowScriptAccess" value="always"></param>
<embed src="http://www.youtube.com/v/u1zgFlCw8Aw?fs=1"
type="application/x-shockwave-flash"
allowfullscreen="true"
allowscriptaccess="always"
width="425" height="344">
</embed>
</object>
See the jsFiddle.