mp4 from PHP - Not playing in HTML5 Video tag

前端 未结 3 1636
终归单人心
终归单人心 2020-12-03 09:18

I am using the video tag to play videos.

I using php files for the playback like this:

    
相关标签:
3条回答
  • 2020-12-03 09:41

    The above code is working. After i changed the src url for .php files, it did actually work. Now it plays in moz, ie, chrome with only php files as sources in the video tag.

    0 讨论(0)
  • 2020-12-03 09:48

    You will have to echo the path after retrieving it and pass it to the 'src' attribute of the Video Tag of HTML5. Your Current Strategy won't work well, i hope...

    For example,

    <source src="<?php echo getMp4VideoUrl(); ?>" type='video/mp4'/>
    
    0 讨论(0)
  • 2020-12-03 09:59

    The browser identifies the video content from the header sent to it with the request. Just manipulate the header and keep the PHP extension. It will work perfect

    0 讨论(0)
提交回复
热议问题