html5 - Chrome won't play .mp4 file -
i'm trying html5 video work. working off local server.
<video id="headervideo" controls> <source src="<?php echo base_url(); ?>assets/home.mp4" type="video/mp4"> browser not support video tag. </video>
however, file refuses play. when access absolute path shows player play button greyed out. issue here?
browsers internet explorer , safari support .h264 codec plays mp4 files. firefox support theora codec plays .ogv files. chrome supports both .h264 , theora. make video works across browser need encode mp4 video different formats using application handbrake. amke code :
<video id="headervideo" controls> <source src="<?php echo base_url(); ?>assets/home.mp4" type="video/mp4"> <source src="<?php echo base_url(); ?>assets/home.webm" type="video/webm"> <source src="<?php echo base_url(); ?>assets/home.ogv" type="video/ogg"> browser not support video tag. </video>
and change .htacess file support videos
addtype video/mp4 mp4 m4v addtype audio/mp4 m4a addtype video/ogg ogv addtype audio/ogg ogg oga addtype video/webm webm
Comments
Post a Comment