Kong
Kong

Reputation: 23

React-Native Opening Url in MX Video Player with Intent

I am trying to open live stream from my webcams website in Mx Player via React-native I have found a good option:

react-native-send-intent

In my code, I am using this:

  PlayStream (Stream) {
    var SendIntentAndroid = require('react-native-send-intent');
    SendIntentAndroid.openApp('com.mxtech.videoplayer.ad', {'com.mxtech.videoplayer.ad':Stream});
  }

But this opens the Mx Video Player App without playing the stream. The intent documentation from MX PLAYER can be found here : enter link description here

I have tried changing the code to:

'data': Stream and 'videoUri': Stream

but none of these seem to work, has anyone tried to do this in react-native? I already have the rest of my app working fine apart from this intent to open the stream.

Upvotes: 2

Views: 1456

Answers (1)

Stackia
Stackia

Reputation: 2151

react-native-send-intent currently doesn't support opening app with intent data. This PR gives a solution and includes sample codes in README.md to open MX Player.

Upvotes: 1

Related Questions