html5视频标签JSF2

编程入门 行业动态 更新时间:2024-10-26 10:30:44
本文介绍了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

本文发布于:2023-07-13 03:17:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1099777.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:标签   视频

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!