【问题标题】:HTML5 video source does not understand filestorage pathHTML5 视频源不理解文件存储路径
【发布时间】:2016-07-23 09:06:35
【问题描述】:

HTML5 视频源不理解文件存储路径。 例如文件路径是 d:/filestorage 或 c:\tomcat\temp

 <video width="620" height="580" controls="true">
                                    <source  src="#{showVideoBean.fileModel.filepath}" type="video/mp4 .mp4"/>
                                    Your browser does not support the video tag.
                                </video>  

据我了解,来源仅将路径理解为 URL,例如 http://

如何组织视频文件文件存储并使用 HTML5 视频标签播放。 我不想在项目文件夹下存储文件。

【问题讨论】:

    标签: java html tomcat video file-storage


    【解决方案1】:

    解决办法是: 我在 \webapps\file-storage 中创建了简单的 Web 应用程序 它包含 WEB-INF 和 web.xml 在我的后端,我将视频文件存储在 \webapps\file-storage 并在网页中

     <video width="620" height="580" controls="true">
                                        <source  src="/file-storage/#{showVideoBean.fileModel.filepath}" type="video/mp4 .mp4"/>
                                        Your browser does not support the video tag.
                                    </video> 
    
    #{showVideoBean.fileModel.filepath} equals /some/folders/filename.mp4
    

    【讨论】:

      猜你喜欢
      • 2016-11-08
      • 2016-02-23
      • 1970-01-01
      • 2018-05-17
      • 2015-11-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多