从 BLOB 获取视频并使用 <iframe> 或 <embed> 标签使用 struts2 操作播放该视频

Get video from BLOB and play that video using struts2 action using <iframe> or <embed> tag

我可以使用 <s:url action='downappsuservideo'/> 成功打开从 BLOB 读取的视频,但是当我将它放入嵌入标签时它不起作用。

如何在页面内播放?

        <embed src="<s:url action='downappsuservideo'/>" 
              type="application/x-shockwave-flash" 
       pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" 
              name="mediaplayer1" 
     ShowStatusBar="true" 
 EnableContextMenu="false" 
             width="700" 
            height="500" 
         autostart="false" 
              loop="false" 
             align="middle" 
            volume="60">
        </embed>

您不需要 iframe 或嵌入标记。只需使用新的标准方式 HTML5 <video> tag

<video src = "<s:url action='downappsuservideo'/>" 
  autoplay = "false"
     width = "700" 
    height = "500" 
      loop = "false" 
    poster = "posterimage.jpg">

  Sorry, your browser doesn't support embedded videos, 
  but don't worry, you can <a href="<s:url action='downappsuservideo'/>">download it</a>
  and watch it with your favorite video player!

</video>