How to get video from web socket url in android?

社会主义新天地 提交于 2019-12-12 05:49:00

问题


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

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


回答1:


Take a look at okhttp from 3.5.0 they support websockets. Then you can OkHttpDataSource with ExoPlayer.



来源:https://stackoverflow.com/questions/44725871/how-to-get-video-from-web-socket-url-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!