html5视频标签JSF2 [英] html5 video tag JSF2

查看:113
本文介绍了html5视频标签JSF2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码

<video id="myVideo" width="100%"  controls="controls">
   <source src="C:\\myVid.ogg"  type='video/ogg; codecs=&quot;theora, vorbis&quot;' />
  </video>

是否可以在JSF2中使用它(动态来源)

Is there away to use it in JSF2 (dynamic source)

已编辑:

我正在尝试链接到另一台服务器光盘上的文件:

I am trying to link to file on the disc of another server:

<video id="myVideo" width="100%"  controls="controls">
<source src="\\myip\storage\ogg\VX-276.ogg"  type='video/ogg; codecs=&quot;theora, vorbis&quot;' />
</video>

(来源实际上是EL experssion)。
文件未显示!

(the source is actually EL experssion). the file is not being displayed!

当我尝试用chrome打开它时,会自动将其更改为: file:// myip / storage / ogg / VX-276.ogg 我试图添加我的servlet图像路径 file://// myip // storage // ogg // VX- 276.ogg 但是url更改为文件:\ myip \storage \ogg\VX-276.ogg 哪个没有存在!

When I try to open it with chrome it automatically changes it to: file://myip/storage/ogg/VX-276.ogg I tried to add in my servlet image path file:////myip//storage//ogg//VX-276.ogg however the url is changes to file:\myip\storage\ogg\VX-276.ogg which does not exist!

如果我写 \\\\myip \\storage \\ogg\\ VX-276 .ogg 该文件未在浏览器中显示!

if I write \\\\myip\\storage\\ogg\\VX-276.ogg the file is found by not being displayed in the browser!

如何编写URL以显示它?

How do I need to write the URL to display it?

推荐答案

在Facelets中,您只需在模板文本中使用EL。

In Facelets, you can just use EL in template text.

<video id="myVideo" width="100%" controls="controls">
    <source src="#{bean.videoURL}" type="video/ogg" />
</video>

这篇关于html5视频标签JSF2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆