CodeIgniter Forums
HTML5 Video Player - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: HTML5 Video Player (/showthread.php?tid=62433)



HTML5 Video Player - iamthestreets - 07-14-2015

Hi,

I am really hoping someone can help me with playing a video using HTML5 Video.

In my controller I am getting the video data and passing it to my view. I am unable to play the video because the content type is set to text/html. I am able to set the content type for the entire page to video/mp4, but then it just plays the video in the entire page. I want the video to be played in my view that has been styled with a header, footer, etc.

So I am basically asking how do I set the content type for just the video file and not the page?

If I need to provide any code snippets please let me know.


RE: HTML5 Video Player - Diederik - 07-14-2015

The page should just be text/html. Only the video url should be video/mp4. Asuming the video url points directly to the file itself you can set the content type in .htaccess.


RE: HTML5 Video Player - arma7x - 07-14-2015

Try use this method
http://www.w3schools.com/html/html5_video.asp