如何媒体播放器连接到一个搜索栏? [英] How to connect Media Player to a SeekBar?

查看:97
本文介绍了如何媒体播放器连接到一个搜索栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要显示一个媒体对一个搜索栏的进展情况。
此外,我想允许介质内用户跳。

I want to show the progress of a media on a seekbar. Also I want to allow user to "jump" within a medium.

我有一个的MediaPlayer,和一个搜索栏。而据我看到没有一个简单的方法来合并它们。

I have a MediaPlayer, and a SeekBar. And as far as I see there is no an easy way to merge them.

推荐答案

您可以用它代替MediaPlayer的VideoView,你可以有它的MediaController可设定VideoView。

You can use VideoView instead of MediaPlayer and you can have MediaController which can be set to VideoView.

另外,你必须得到在实例进步和更新,你可以使用定时器搜索栏。

Otherwise you have to get the progress at instances and update the seek bar you can use timers.

这篇关于如何媒体播放器连接到一个搜索栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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