I have following code to start mxplayer from b4a apk and it plays video successfully...now i would like to add external srt file from http to be automatically included when video is played..so i get this api:
https://sites.google.com/site/mxvpen/api
Source code example in java is here:
https://sites.google.com/site/mxvpen/api/sample_code.zip?attredirects=0&d=1
My code to start mxplayer with video that works:
VideoClub.MovieURL = "http://192.168.1.100/NAME.AVI"
VideoClub.MovieSubtitle = "http://192.168.1.100/NAME.SRT"
Using example in mxplayer api i try to add this way:
MXPlayer is started, video is played but not SRT loaded in MXPlayer..so how it needs to be done correctly using example from java?
Thanks.
https://sites.google.com/site/mxvpen/api
Source code example in java is here:
https://sites.google.com/site/mxvpen/api/sample_code.zip?attredirects=0&d=1
My code to start mxplayer with video that works:
VideoClub.MovieURL = "http://192.168.1.100/NAME.AVI"
VideoClub.MovieSubtitle = "http://192.168.1.100/NAME.SRT"
B4X:
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
'DEFINE - sw
Dim sw As Byte = 2
'DEFINE - Subtitle
Dim Subtitle(0) As String = Array As String(VideoClub.MovieSubtitle)
'DEFINE - Intent
Dim Intent1 As Intent
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
'INITIALIZE - Movie
Intent1.Initialize(Intent1.ACTION_VIEW, VideoClub.MovieURL)
'SET - Title
Intent1.PutExtra("title", VideoClub.MovieTitle)
'SET - Data Type
Intent1.SetType("application/x-mpegURL")
'SET - S/W Decoder
Intent1.PutExtra("decode_mode", sw)
'SET - MX Player
Intent1.SetComponent("com.mxtech.videoplayer.pro")
'START - MX Player
StartActivityForResult(Intent1)
End Sub
Using example in mxplayer api i try to add this way:
B4X:
'SET - Subtitle
Intent1.PutExtra("subs", Subtitle)
Intent1.PutExtra("subs.name", "NAME")
Intent1.PutExtra("subs.filename", "NAME.SRT")
Intent1.PutExtra("subs.enable", Subtitle)
MXPlayer is started, video is played but not SRT loaded in MXPlayer..so how it needs to be done correctly using example from java?
Thanks.