How to streaming video over a local network in android VideoView

Due to office restrictions, I have a LAN network without the Internet and you have to transfer videos to my Android application.

I can view the video in ES Explorer on the device via smb ok. But what is the best way to make it play in my VideoView app? using "smb: //192.168.xx/Users/Public/ .." because the URI does not work.

Thanks.

+4
source share
2 answers

I was able to play smb:// shares over the network in VideoView with:

I understand that this seems confusing (and I agree), but this is the only way I managed to get it to work (and work well, with search, etc.). I would be interested if there are better solutions.

0
source

I found out that one (cheap) way is to simply install the VLC media player and transfer the video from the PC there, following the instructions of the android-video-streaming-example .

So, in android activity, it looks something like this:

 myVideoView.setVideoURI(Uri.parse("rtsp://192.168.2.3:5544/")); 

Now working on my application, but the backlog is terrible (5+ seconds), so the question is still open for better answers, while I will experiment with other things ..

0
source

Source: https://habr.com/ru/post/1489428/


All Articles