Android:媒体播放器中音频、图像和文本的同步,
我想知道如何同步 mp3 文件、文本框和图像(mp3、文本和图像必须通过 http 接收),这些文件将显示在视频播放器上,视频播放器必须每 10 秒接收并显示图像,同样有一个带有同步音频的文本框,因此带有图像(显示 mp3 的文本),我已经研究过,但我不知道从哪里开始,如何管理间隔和数据,方法为“计时器” “在c#中,真的会感谢您的帮助。
I would like to know how I can synchronize an mp3 file, a text box and images (mp3, text and images must be received via http) that is will be displayed on a video player which must receive and show the images every 10 seconds, and likewise have a text box with the synchronized audio and therefore with the images (showing the text of the mp3), I have researched, but i not know where to start, how to manage the intervals and the data, with methods as "timer" in c #, really would appreciate your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我假设文本和图像具有与之关联的时间戳。 (TimeStamps - 它们应该相对于音频显示的时间),如果是这样,那么您可以执行此操作
MediaPlayer
类播放音频文件getCurrentPosition()
获取时间值TextView
和ImageView
I am assuming the text and the images have TimeStamps associated with them. (TimeStamps - Time at which they should be displayed relative to the audio), if so then you can do this
MediaPlayer
classgetCurrentPosition()
to get the time valueTextView
andImageView
查看 android sdk 中提供的 CountDownTimer 类来管理间隔: http:// developer.android.com/reference/android/os/CountDownTimer.html
至于通过 http 获取图像,这里是一个关于套接字的简单 java 教程: http://docs.oracle.com/javase/tutorial/networking/sockets/
Check out the CountDownTimer class provided in the android sdk to manage the intervals: http://developer.android.com/reference/android/os/CountDownTimer.html
As for getting images via http here is a simple java tutorial on sockets: http://docs.oracle.com/javase/tutorial/networking/sockets/
我解决了这个问题:
我希望能帮助别人。
I resolved that with:
I hope to help others.