Do you want to store video in media library? I would recommend you to store videos in Youutube or Vomeo and use third party player. Because handling videos isn't so easy. You have to store it ike file, and render video file as usual file, look at this helper:
public static string GetImageUrlById(string id, UmbracoHelper Umbraco)
{
var imageUrl = "";
if(!string.IsNullOrEmpty(id))
{
var image = Umbraco.Media(id);
imageUrl = image.url;
}
return imageUrl;
}
But you need to add some html of video player, for example:
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
How to render a Video using Media Picker?
Thanks in advance.
Hi Ramprasad,
Do you want to store video in media library? I would recommend you to store videos in Youutube or Vomeo and use third party player. Because handling videos isn't so easy. You have to store it ike file, and render video file as usual file, look at this helper:
But you need to add some html of video player, for example:
http://www.w3schools.com/html/html5_video.asp
Thanks,
Alex
Hi Ramprasad,
Did you render Video?
Can you answer how did you make it?
Thanks
Thanks Alex for the reply...
Busy with my work and didn't replied.
I just done it with this.
IPublishedContent variable= helper.TypedMedia(propname.ToString());
Ramprasad, glad that you solved your issue!
is working on a reply...