JMF:当播放器达到一定时间时如何触发事件? [英] JMF: How to trigger event when player reaches a certain time playing a video?

查看:96
本文介绍了JMF:当播放器达到一定时间时如何触发事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Java进行编码(使用Java Media Framework):当播放器达到某个时间播放视频剪辑时(例如,达到3.124分钟的再现时间),它会生成一个事件?

How to code in Java (with Java Media Framework): When the player reaches a certain time playing a video clip (for example, reaching 3.124 minutes in reproduction time), it generates an event?

推荐答案

看看
http://www.javaworld.com/javaworld/jw- 04-1997/jw-04-jmf.html?page = 1 [
Have a look to
http://www.javaworld.com/javaworld/jw-04-1997/jw-04-jmf.html?page=1[^]
on the third page they say...
The java.media.Player interface extends from the Controller interface, which itself extends the Clock interface. The Clock interface specifies methods used for synchronization and timekeeping, while Controller adds variables and methods used to track state and state transitions


并在第4页上...


and on the 4th page...

Other advanced features are provided for in the Player API. Any player may act as a controller for one or more other players. This synchronization is achieved through the use of TimeBase objects, which function as clocks in JMF. Players can synchronize with one another using methods such as getTimeBase and setTimeBase.



因此,寻找Java.Media.Player clock会得到一些可能对您有帮助的结果.
http://java.sun.com/javame/reference/apis/jsr927/javax/media/Clock.html [ ^ ]
http://docs.oracle.com/cd/E17802_01/j2se/javase/technologies/desktop/media/jmf/2.1.1/apidocs/javax/media/bean/playerbean/MediaPlayer.html [ http://www.cs.vu.nl/~eliens/documents/java/white/jmf.html [ ^ ]

希望对您有帮助



So looking for Java.Media.Player clock gives some results that might help you.
http://java.sun.com/javame/reference/apis/jsr927/javax/media/Clock.html[^]
http://docs.oracle.com/cd/E17802_01/j2se/javase/technologies/desktop/media/jmf/2.1.1/apidocs/javax/media/bean/playerbean/MediaPlayer.html[^]
http://www.cs.vu.nl/~eliens/documents/java/white/jmf.html[^]

hope it helps


这篇关于JMF:当播放器达到一定时间时如何触发事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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