video tag src not picking ftp url as a source?

后端 未结 4 916
礼貌的吻别
礼貌的吻别 2020-12-04 02:41

in video tag src we are trying to give src as a ftp resource its not picking it up. Can somebody give some direction on that.

相关标签:
4条回答
  • 2020-12-04 03:09

    The issue here is :

    Loading an FTP sub-resource through an HTTP / S page is not allowed

    This is for security issues, see https://bugzilla.mozilla.org/show_bug.cgi?id=1361848

    0 讨论(0)
  • 2020-12-04 03:14

    Use this code:

    <video width="320" height="240" controls="controls">
    <source src="http://movie.mp4" type="video/mp4" />
    
    0 讨论(0)
  • 2020-12-04 03:16

    something like this

    <video width="320" height="240" controls="controls">
      <source src="http://movie.mp4" type="video/mp4" />
      <source src="http://movie.ogg" type="video/ogg" />
      Your browser does not support the video tag.
    </video> 
    
    0 讨论(0)
  • 2020-12-04 03:17

    I suspect that's because to allow efficient usage, the browser makes HTTP range requests, which are part of HTTP, not FTP. FTP is a pretty old protocol, and isn't really appropriate here for lots of reasons (no range requests, basic/no caching info, etc).

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