Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Playing MP4 video View modes: 
User avatar
Member
Member
Jonathontek-gmail - 12/26/2012 6:49:26 PM
   
Playing MP4 video
I am trying to play MP4 videos that are stored in a Media Library.

I am using a HTML 5 video player to view these videos. I have the correct url to the file. If I add the file to a <a> link then right click and save as I am able to download the file so that is fine, but when I try and play the video chrome inspector is is returning a 404. I have added the MIME type in iis. I am out of ideas??? I can't find anything in the documentation. I have been stuck on this one for a couple of days. Any suggestions? Do I need to set up something else in iis? I have added <add key="CMSVideoExtensions" value="avi;mp4;mpg;mpeg;wmv;qt;mov;rm;flv" /> to the config file. Do I need to add some sort of custom handler??

Thanks..

User avatar
Member
Member
Jonathontek-gmail - 12/26/2012 6:52:14 PM
   
RE:Playing MP4 video
Here is the code I am using..

string HTML = string.Format("<video id=\"my_video_1\" class=\"video-js vjs-default-skin center\" controls preload=\"auto\" width=\"640\" height=\"264\" poster=\"my_video_poster.png\" data-setup=\"{0}\"> <source src=\"{1}\" type=\'video/mp4\'> <source src=\"{1}\" type=\'video/webm\'> </video>", "{}", pathToVideo); - this is being passed to a literal control in custom web part.

URL is retrieved by (FileGuid is hard coded for testing):
MediaLibraryHelper.GetMediaFileUrl("B64350CE-195A-4376-82B8-8E2357349775", CMSContext.CurrentSiteName);

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 12/27/2012 1:37:10 AM
   
RE:Playing MP4 video
Hi,

From your description it is not clear whether you have made the changes mentioned in the documentation or not. Could you please confirm?

Best regards,
Juraj Ondrus