I am trying this code.
<video width="320" height="240" controls="controls" autobuffer="autobuffer"> <source src="data:video/mp4;base64,AAAA<?php echo chunk_split(base64_encode(trim(file_get_contents('kecak.mp4')))); ?>" type="video/mp4" /> Your browser does not support the video tag. </video>
It works when I play in a laptop (safari, firefox), but it does not work when I play on iPad2 (safari) or Samsung Galaxy (Opera). I think the problem is
src="data:video/mp4;base64,AAAA<?php echo chunk_split(base64_encode(trim(file_get_contents('kecak.mp4')))); ?>
because when I replace with
src="kecak.mp4"
It works on all devices and in the browser. I have to use base64_encode (trim (file_get_contents ('kecak.mp4'))) because in my case it comes from a response from RESTFul to a delivery video via http. string response from http with base 64_encode (trim (file_get_contents ('kecak.mp4'))). thanks u for reference :-)
source share