flutter_vlc_player
flutter_vlc_player copied to clipboard
How can I enable and use the rtp feature for iOS? can you give an example
I am using RTP for android, but maybe it will work for iOS too. I have a SDP file saved in the app docs with the following content:
v=0
m=video 1234 RTP/AVP 96
c=IN IP4 172.0.0.1
a=rtpmap:96 H264/90000
The RTP is broadcasted to the mobile device IP + port 1234.
I then play the stream using:
_videoVlcController = VlcPlayerController.file(
File("$pathToSdpFile"),
autoPlay: true,
);
If you can't have a file downloaded by the user, you can write it and save it before you need to read it using something like:
File sdp = File(pathToSdpFile!);
if (!await sdp.exists()) {
sdp.writeAsString("v=0\nm=video 1234 RTP/AVP 96\nc=IN IP4 172.0.0.1\na=rtpmap:96 H264/90000", mode: FileMode.append, flush: true);
}