文件浏览器 JWPlayer.
Filebrowser for JWPlayer
我想构建一个文件浏览器,它在单击时显示有关文件的信息。然后,文件本身应该加载到每个PHP的jwplayer中。
我可以通过单击文件以某种方式执行此操作吗?还是我应该使用 JavaScript?(我尽量避免)
通过 列出要列出的所有文件 通过 php 输出如下内容来创建文件浏览器:
<div id="player_container"></div>
<a href="./files/file.mp4" onclick="playjw(this)" />
<a href="./files/file2.mp4" onclick="playjw(this)" />
<a href="./files/file3.mp4" onclick="playjw(this)" /> ect
和功能
<script type='text/javascript'>
var temp;
var temphref; //these variables to get the href of the anchor back when opening
//another file so you could open the first file again
function playjw(file) {
var srcfile=file.href;
jwplayer('player_container').setup ({
'flashplayer': 'player.swf',
'file': srcfile,
'controlbar': 'bottom',
'width': '470',
'height': 320,
'provider': 'http'
});
return false; // this is required to not let the browser follow the link.
}
</script>
如果有任何错误,请自行更改功能,因为我可能忘记了某些东西
如果要使用文件浏览器,请使用基于 php/javasript 的脚本。不要试图自己构建它,除非你有太多时间。检查 http://www.gerd-tentler.de/tools/filemanager/和 http://encode-explorer.siineiolekala.net/explorer/index.php。网络上充满了优秀的免费脚本。根据您希望如何使用jwplayer(音频?视频?),您可以轻松创建播放文件的div(请参阅jw文档)或创建播放文件的iframe。
最简单的方法是为所有以创建div/iframe 的 .mpg 或.mp3结尾的文件创建一个 onclick 事件。
相关文章:
- 访问布局信息是否也会导致浏览器重排
- 内部分区字体大小获胜'调整浏览器窗口大小时不会随媒体查询而更改
- 如何使用phaser使html5游戏在移动设备浏览器上运行
- 有时数据是't显示在浏览器中
- 使图像在单击时展开到不大于浏览器
- fetch() 函数未在 Ubuntu Chromium 浏览器上定义
- 不同浏览器中的空白字符正则表达式行为
- 在Windows 10中自动执行例行程序(主要与浏览器交互)
- Windows形成web浏览器控件和Javascript更改的DOM
- 如何临时暂停浏览器渲染,然后恢复整个页面
- 使用angularjs向浏览器发送servlet响应(下载功能)
- 是什么让一个“;Uncaught RangeError:超过了最大调用堆栈大小“;错误(Chrome,在其他浏览器中显示
- 谷歌地图API v3不适用于移动浏览器或PhoneGap
- 禁用(而不是隐藏)浏览器滚动条
- jquery代码在Mozilla中有效,但在其他浏览器上无效
- 如何使用modalDialog来显示可以在所有浏览器中工作的弹出窗口
- 当浏览器上的后退按钮到达主页时,我需要删除Class
- 文件浏览器 JWPlayer.
- JWPlayer自动检测每个用户的最佳质量,而不使用其他浏览器的flash播放器(HLS,.m3u8)
- 使用JavaScript从浏览器内上传到JWPlayer平台