Reputation: 155
I want to embed some youtube videos at my site using Video.Flash helper. Microsoft.Web.Helpers is added to the References.
Using
@Microsoft.Web.Helpers.Video.Flash(path: "http://www.youtube.com/watch?v=ENf_RJMz2WE")
or
@Microsoft.Web.Helpers.Video.Flash("http://www.youtube.com/watch?v=ENf_RJMz2WE")
doesn't show anything. Just a blank page. If I right click, the menu says "Movie not loaded".
I have flash player installed correctly, I can see youtube videos.. Any ideas?
Upvotes: 1
Views: 2612
Reputation: 16960
The URL you're passing is the full HTML Youtube page rather than the flash video itself. To embed the video youtube uses the URL format youtube.com/v/{id}
rather than youtube.com/watch?v={id}
. The correct way would be:
@Microsoft.Web.Helpers.Video.Flash("http://www.youtube.com/v/ENf_RJMz2WE")
where ENf_RJMz2WE
is your video id.
Upvotes: 3