Android Question Video online not work

Alisson

Active Member
Licensed User
Hi.

I try use the code to watch videos online, but the code not work:

B4X:
#Region  Project Attributes
    #ApplicationLabel: B4A Example
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
  Dim mp As MediaPlayerStream
End Sub

Sub Globals

End Sub

Sub Activity_Create(FirstTime As Boolean)
  If FirstTime Then
    mp.Initialize("mp")
  End If
  mp.Load("http://memobunch2.tempsite.ws/uploads/1498089668.mp4")
End Sub
Sub mp_StreamReady
  Log("starts playing")
  mp.Play
End Sub
Sub mp_StreamError (ErrorCode As String, ExtraData As Int)
  Log("Error: " & ErrorCode & ", " & ExtraData)
  ToastMessageShow("Error: " & ErrorCode & ", " & ExtraData, True)
End Sub
Sub mp_StreamBuffer(Percentage As Int)
  Log(Percentage)
End Sub

This my print screen with logs:

upload_2018-7-19_16-0-4.png


I think be the encode video.

Does anyone know the video encode to run on Android?

Thanks very much.
 

Alisson

Active Member
Licensed User
This week I will buy the current B4A. I need my app to support Video and Material Design.
Because I'm using B4A 5.50.
You left an additional lib exoplayer_additional_libs, but I do not know how to proceed with the libraries. Could you help me, after I buy the current B4A?
 
Upvote 0
Top