且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

LibVLC Android 中的进度对话框

更新时间:2023-01-24 13:16:11

使用播放器的媒体状态.
0 什么都没有,
1 次开放,
2 缓冲,
3 玩,
4 暂停,
5 停了,
6 结束,
7 错误

Use the media state from the player.
0 nothing,
1 opening,
2 buffering,
3 playing,
4 paused,
5 stopped,
6 ended,
7 error

    if not self.player.get_media():
        print "fail"
        return
    else:
        media_state = self.player.get_state()
        while media_state != 3 and media_state != 4:
            media_state = self.player.get_state()
            print repr(media_state)
    print repr(media_state)