如何从Android中的Web套接字URL获取视频? [英] How to get video from web socket url in android?
本文介绍了如何从Android中的Web套接字URL获取视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从Android中的Web套接字URL获取视频mp4文件, 该URL类似于以下示例:
I want to get a video mp4 file from web socket URL in android, The URL look like the following example:
"ws://xxxx.xxxx.xxxx.com/mp4
"ws://xxxx.xxxx.xxxx.com/mp4
我不知道在exoplayer中是否可能,如果可以,那么在Web套接字url(不是Http)中怎么可能.
I have no idea if its possible in exoplayer , and if so then how is it possible in a web socket url (Not Http).
我很乐意收到有关此问题的任何示例
I would be happy to receive any example to this problem
推荐答案
从3.5.0版开始看看okhttp,它们支持websocket.然后,您可以使用带有ExoPlayer的OkHttpDataSource.
Take a look at okhttp from 3.5.0 they support websockets. Then you can OkHttpDataSource with ExoPlayer.
这篇关于如何从Android中的Web套接字URL获取视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文