远程控制(从网页)远程计算机上的媒体播放器?
我只想要一个像控制器这样的界面,它可以控制在远程服务器上播放的某种播放器(Flash 或其他任何东西)的“播放/暂停/停止/..等”,在同一域下通过“HTTP”。
简单来说,我只是想控制远程机器上播放的视频,但“控制器”端必须在网页上。
++ +++++ 网络服务器 ++++++++ <---<---< +++++++ 客户端网页 +++++++++
+++++ 播放视频 ++++++++ ........................ ++++ 使用遥控器 +++++++
+++++++++++++++++++++++++........................ +++[ 播放/停止/下一个/上一个] +++++
- 有可能吗?
- 通过服务器播放的播放器通常会显示在“网页”上,但是..是否可以使用某种“桌面播放器”?
- 对于网页,我应该使用哪个“播放器”,Flash 播放器(例如 Flowplayer)/插件(例如 VLC 插件)?
PS:服务器端首选“PHP”
I just want a interface like a controller which can control "Play/Pause/Stop/ ..etc" for some kind of player (Flash or anything else) playing on a remote server, across "HTTP" under same domain.
With simple words, i just wanna control a video playing on a remote machine, but "controller" side must be on a webpage.
+++++++ Web Server ++++++++ <---<---< +++++++ Client Web Page +++++++++
+++++ PLAYING VIDEO ++++++++ .............. ++++ with REMOTE CONTROL +++++++
+++++++++++++++++++++++ ............... +++[ PLAY / STOP / NEXT / PREV ]+++++
- Is it possible?
- Player playing over server will be displaying on a "Web Page" normally but.. is it possible for some kind of "Desktop Player" ?
- For Webpage, which "Player" should i use, A Flash Player (like, Flowplayer) / A Plugin (like, VLC Plugin) ?
P.S: Prefer "PHP" for server side
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,这可以通过 VLC 来完成:
点击:查看 ->添加接口->网页界面
然后在浏览器中访问
http://127.0.0.1:8080
,第一页控制二进制播放器的播放(就像遥控器一样)。还有一个巧妙的小功能是 Flash 播放器:
http://127.0.0.1:8080/flash.html
它将使用 Flow Player 在页面上流式传输视频,我很确定这就是您想要的。请访问下面的链接,了解有关设置和各种选项的更多信息。wiki.videolan.org/Interface
Yes this can be done with VLC:
Click: View -> Add Interface -> Web Interface
Then Visit
http://127.0.0.1:8080
in your browser, the first page controls the playback of the binary player (Like a remote control).Also a neat little feature is the flash player:
http://127.0.0.1:8080/flash.html
it will stream the video on the page with Flow Player, im pretty sure thats what your looking for. Visit the link below for more info about setting it up and the various options.wiki.videolan.org/Interface
是的,您可以借助 Ajax + jPlayer 来完成此操作。
本质上,您要做的就是在 page1 上设置 jPlayer,以继续调用后端上的 php 文件来检查任何新命令。这是一个伪代码,如果您需要更多帮助,我可以编写实际的代码来实现它。
page1.php
page2.php
具有调用 api.php 并设置api.php 的
下面是实际情况,
当然知道您将需要防止通过 api.php 进行 SQL 注入,因为您不希望某些攻击者向 api.php 发送虚假命令。为了防止这种情况,我建议将命令(播放、暂停、下一个、上一个、跳到等)列入白名单,以便限制您的脚本的功能。
Yes you can do this with the help of Ajax + jPlayer.
Essentially what you are going to want to do is set up jPlayer on page1 to keep calling a php file on your backend that checks for any new commands. Here it is a pseudo code, if you need more help I can write actual code that does it.
page1.php
page2.php
api.php
Here is how it would look in practice
Of course know that you will need to protect against SQL injection via api.php as you don't want some attacker to send a fake command to api.php. To protect against this I would suggest whitelisting commands (play, pause, next, prev, skip to, etc) so that there is a limit to what your script is capable of.