开发者

Youtube videos link in my own admin

Problem: client has lot's of videos. He uploads them to youtube. i've built a simple cms for him where he updates the content on the site. I would like to simplify the process of linking the videos within the cms.

Currently he has to

  1. upload the video to youtube
  2. "embeded" the youtube code in the cms.

is there a simpler? better solution? any suggestions would be very helpful. Thanks in advance. Sh开发者_JAVA百科ane


Have the client create a YouTube channel and create playlist(s) within that channel. Then the client can just tell you which playlist(s) to include on the site and you can pull in all the videos within specific playlists via the YouTube API.

This way you set it (once) and forget it. And the client can maintain the playlists within YouTube as they see fit and know that the videos within those playlists will be automatically included on the web site.

Here are some sample code snippets:

// Init service.
YouTubeService service = new YouTubeService("MyApplicationName", "MyDeveloperApiKey");

// Get playlists for youtube user (your client).
PlaylistsFeed playlists = service.GetPlaylists(new YouTubeQuery("http://gdata.youtube.com/feeds/api/users/[CLIENT_USER]/playlists"));

// Get playlist feed.
PlaylistFeed feed = service.GetPlaylist(new YouTubeQuery("http://gdata.youtube.com/feeds/api/playlists/" + playlistID)));

// Get list of video IDs for playlist.
(from atomEntry in feed.Entries select (atomEntry as PlaylistEntry).VideoId).ToList());


YouTube API integration ASP.NET - upload video with a single page

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜