php - Video not working on html5 media player in Codeigniter -


i'm trying play video using html5 media player in web application created using codeigniter framework. have far:

      public function view($settings, screen $screen)       {              $view = "<video width='100%'' height='100%'' controls>                          <source src='application/views/video/arrow.mp4' type='video/mp4'>                          browser not support video tag.                       </video>";              return $view;       } } 

i've tried putting video file in different directories, i've tried adding mimes file type.

you need put video outside of application folder.

in mvc architecture, models , views should not directly accessible user, except controller.

create folder named videos in project root directory, put arrow.mp4 file inside folder , change code block results.

function view ( $settings, $screen ) {     $view = "<video width='100%' height='100%' controls>                  <source src='videos/arrow.mp4' type='video/mp4'>                  browser not support video tag.              </video>";     echo $view; } 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -