Chromecast SDK(Android)-是否可以检查在投射设备上播放的媒体是否已完成播放? [英] Chromecast SDK (Android) - is there a way to check whether the media playing on the cast device has finished playing?
本文介绍了Chromecast SDK(Android)-是否可以检查在投射设备上播放的媒体是否已完成播放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否存在某种onFinished侦听器?还是我们必须将当前流的位置与曲目的持续时间进行比较?
Is there an onFinished listener of some sort? Or do we have to compare the current stream position against the duration of the track?
推荐答案
虽然不漂亮,但您可以拨打电话:
It's not pretty but you can make this call:
if (mRemoteMediaPlayer.getMediaStatus().getPlayerState() == MediaStatus.PLAYER_STATE_IDLE
&& mRemoteMediaPlayer.getMediaStatus().getIdleReason() == MediaStatus.IDLE_REASON_FINISHED) {
...
}
这篇关于Chromecast SDK(Android)-是否可以检查在投射设备上播放的媒体是否已完成播放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文