views:

358

answers:

1

Is there any ASP.Net command that can detect how long youtube videos are automatically? On my website people can add youtube videos to the database but I don't wanna have to manually find out the length of every youtube video people add.

+2  A: 

You might take a lil' look at the YouTube API. I haven't tried it, but I searched Google for 'YouTube API'.

http://code.google.com/apis/youtube/overview.html

Time Machine
Yep, there's even a .NET data API with samples for getting details about a video entry: http://code.google.com/apis/youtube/2.0/developers_guide_dotnet.html#Video_Entry_Contents this will then enable you to use the mediaContent.Duration property to find the length of the video in seconds http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:duration
Zhaph - Ben Duguid