About XMTV Player › Forums › Development › Parse secure RTMP urls to XMTV
This topic contains 9 replies, has 3 voices, and was last updated by support 1 year, 3 months ago.
-
AuthorPosts
-
20 February 2015 at 15:20 #704
Hi,
I want to parse rtmp parameters like rtmp, swfUrl, live, pageUrl, token etc to XMTV player from my activity, How can i do that??
20 February 2015 at 15:35 #705Below is example of method how to call XMTVPlayer to play video link:
Play single media: https://xmtvplayer.com/development-api, more info about complex rtmp: https://xmtvplayer.com/build-m3u-file.String VideoUrl = “rtmp://$OPT:rtmp-raw=rtmp://xxx.xxx.xxx.xxx/app playpath=lxkcbvxdlkj swfUrl=http://www.xxxxxx.tv/resources/scripts/eplayer.swf live=1 pageUrl=http://www.xxxxxxxx.tv/ conn=S:OK live=1 token=SomeToken”;
XMTVPlayerPlayUri(“Name of stream”,VideoUrl);/**
* @param Title – Media Name
* @param uri – path/url to media
*/
public void XMTVPlayerPlayUri(String Title,String uri){
Bundle bnd = new Bundle();
bnd.putString(“path”, uri);
bnd.putString(“name”, Title);
Intent intent = new Intent();
intent.setClassName(“com.xmtvplayer.watch.live.streams”,”org.zeipel.videoplayer.XMTVPlayer”);
intent.putExtras(bnd);
startActivityForResult(intent, 100);
}20 February 2015 at 15:54 #707Thanks
What if i have some parameters missing? can i skip those parameters in the url parsing like
String VideoUrl = “rtmp://$OPT:rtmp-raw=rtmp://xxx.xxx.xxx.xxx/app playpath=lxkcbvxdlkj swfUrl=http://www.xxxxxx.tv/resources/scripts/eplayer.swf live=1 pageUrl=http://www.xxxxxxxx.tv/ live=1”;
and also please tell me if the order of the parameters in the VideoUrl matters?
20 February 2015 at 16:25 #708you can skip all parameters which are not required for your stream, also there is not required order when pass parametres.
-
This reply was modified 1 year, 5 months ago by
support.
20 February 2015 at 16:41 #710Thanks a lot, i got it working finally
20 February 2015 at 16:47 #711If you have any further queries, please do not hesitate to contact us.
9 May 2015 at 19:40 #942how can i set click a rtmp link direct open to xmtv player
12 May 2015 at 17:41 #943You can add this method to your code and ivoke it with url and title.
XMTVPlayerPlayUri(“Your video title”,”Your rtmp:// video link”);/**
* @param Title – Media Name
* @param uri – path/url to media
*/
public void XMTVPlayerPlayUri(String Title,String uri){
Bundle bnd = new Bundle();
bnd.putString(“path”, uri);
bnd.putString(“name”, Title);
bnd.putBoolean(“HiddenMode”, true); // Hide Share & Favorite button from player
bnd.putBoolean(“NoExitPrompt”, true); // Exit from player with one click of back button
bnd.putBoolean(“HideBufferLine”, true); // Hide yellow buffer status line
Intent intent = new Intent();
intent.setClassName(“com.xmtvplayer.watch.live.streams”,”org.zeipel.videoplayer.XMTVPlayer”);
intent.putExtras(bnd);
startActivityForResult(intent, 100);
}12 May 2015 at 20:48 #945this above code id html code?
13 May 2015 at 21:22 #946You use WebView in your app to show your HTML code. You must add this code in your app, not in html. If you want to be run direct without to code in your app, We must add unique handler like httpopt, but for rtmp rows, let me know and we will add it on next release.
Regards
-
This reply was modified 1 year, 5 months ago by
-
AuthorPosts
You must be logged in to reply to this topic.