21
votes

If we need to write a cross-platform mobile app, which supports playing and broadcasting RTMP video streams. I know that one can use Android native libs and Objective C also has some. But can we do it truely cross-platform and without using unsupported Flash, Adobe AIR or other external components?

Which is the right way to write cross-platform (at least Android >= 4 + iOS; WP, blackberry - nice to have) mobile apps with RTMP/RTSP support?

Approx requirements:

  • to play one or several RTMP streams on app page with minimum delay (1-3 secs max - here's why HLS with delay up to 10-20 sec not fits)

  • broadcast from a mobile device camera to RTSP server

  • (optionally) broadcast from mobile camera to RTMP server (by encoding stream to RTMP on client-side)

Does writing a PhoneGap plugin fits this task? Which is the right way for such a plugin - try to embed livu lib RTMP client (or other, RTMPy client) into a plugin code like using livu (lib) with phonegap? or branch on OS version inside plugin and use some compiled native video streaming tools?

PS: If you used such a plugin somewhere from github, or have some experience about using cross-platform frameworks for video-streaming - please share your experience. If you have a ready streaming plugin and are willing to sell it, or can write it - please also comment, I would be glad to pay for it.

2
Why did you put away Adobe AIR? it seams like the natural solution given that flash is the brother of RMTP protocolxleon
IF you have to create plugin (which has native components) to be included into Phonegap or Ionic or in general any kind of cross platforms, this link may give you an initial approach. stackoverflow.com/questions/40974950/… I had to create plugin for android and ios which was used in Ionic applicationSreehari

2 Answers

1
votes

Maybe you could user node-media-server?

https://www.npmjs.com/package/node-media-server

I'm currently developing a system of security cameras, and I am using this module to stream video from them to the server. I managed to use it to stream multiple videos from different cameras. It could work with streaming from a phone too, maybe it is posible to use react-native to do it.

-2
votes

Hi you can use ionic framework to embed video streaming for mobile app and the reference for the link is Nic raboy video in Ionic and the plugin for the project is camera, you can edit this plugin documents based upon your requirements in delaying the app to show and inject $http service in your controller to send the data to server