how to control media player using script or code

China☆狼群 提交于 2019-12-12 04:18:08

问题


Is there a media player, where you can control its audio and video using script or code.for example lets say i want to pause the video after n secs, which player supports this? I am looking for free opensource solution which runs on desktop i.e windows 7.


回答1:


I'm not the kind of giving the entire solution. But here's a good place to start. It shows how to embed Windows Media Player in a Windows Form.

http://msdn.microsoft.com/en-us/library/bb383953(v=vs.90).aspx

You'll have access to control like play, stop, etc.




回答2:


VideoLan supports such use.

For instance, see here: http://www.videolan.org/doc/play-howto/en/ch04.html

From the link:

--extraintf allows you to select extra interface modules that will be launched in addition to the main one. This is mainly useful for special control interfaces, like HTTP, RC (Remote Control), ... (see below)

The RC interface is probably best from a pure code/script point-of-view.

The HTTP interface is oriented towards a human using a webpage, but could be controlled from code, too.



来源:https://stackoverflow.com/questions/7503797/how-to-control-media-player-using-script-or-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!