Wifi Direct - streaming video from one device to other

android, video-streaming, wifi-direct

Solution

Take a look at WIFI-Direct documentation

First you need to establish a connection. there is enough code in the documentation to do that.

Then, then you send the file as a stream and receive it on the other side. Now, based on Android MediaPlayer Documentation you need to send the received stream to the mediaplayer. There are different ways to approach this like saving the stream to a file and then passing the file to the mediaplayer. But a better way is implementing a localhttpserver and passing the local uri to the mediaplayer.

I gathered this info from the links below:

Write to file and stream from it

Modifying FileInputStream for mediaPlayer setDataSource

Android ServerSocket programming with jCIFS streaming files

Create mediaplayer with inputstream in android

Sample Local HTTP server

Problem

Please help me getting started how do i achieve live streaming of video on one device on another using Wifi Direct. I have already established connection between the two devices.What is the next step to follow

Original source

Related problems