This is a wrap for this github project.
ExoPlayerTextureView
Author: DonManfred (wrapper)
Version: 1
This Library is, as of the info on github, Experimental. Don´t expect much here. I just tried to do a wrap for it to see if it works...
Please note It is using an old version of the player. V1.5.9
You need a aar (the player) additional to this lib. Download here
So, here it is. Have fun with it
ExoPlayerTextureView
Author: DonManfred (wrapper)
Version: 1
- VideoSource
Methods:- Initialize (EventName As String, url As String, userAgent As String, bufferSegmentSize As Int, bufferSegmentCount As Int) As HlsVideoSource
- IsInitialized As Boolean
- android.permission.ACCESS_NETWORK_STATE
- android.permission.INTERNET
- VideoTexturePresenter
Events:- onError (error As String)
- onStateChanged (playWhenReady As Boolean, playbackState As Int)
- onVideoSizeChanged (width As Int, height As Int, pixelWidthHeightRatio As Float)
- Initialize (EventName As String, view As VideoTextureView)
- IsInitialized As Boolean
- clearAllOnStateChangedListener
- eventListeners As EventProxy
- isPlaying As Boolean
- onCreate
- onDestroy
- pause
- play
- prepare
- release
- seekTo (positionMs As Long)
- stop
- BufferedPercentage As Int [read only]
- BufferedPosition As Long [read only]
- CurrentPosition As Long [read only]
- Duration As Long [read only]
- LimitBitrate As Long [write only]
- Mute As Boolean [write only]
- PlaybackState As Int [read only]
- Source As VideoSource [write only]
- VideoTextureView
Fields:- ba As BA
- BringToFront
- DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
- Initialize (EventName As String)
- Invalidate
- Invalidate2 (arg0 As Rect)
- Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
- IsInitialized As Boolean
- RemoveView
- RequestFocus As Boolean
- SendToBack
- SetBackgroundImage (arg0 As Bitmap)
- SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
- SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
- SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
- SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
- Background As Drawable
- Color As Int [write only]
- Enabled As Boolean
- Height As Int
- Left As Int
- Parent As Object [read only]
- Tag As Object
- Top As Int
- VideoWidthHeightRatio As Float [write only]
Set the aspect ratio that this {@link VideoTextureView} should satisfy. - Visible As Boolean
- Width As Int
B4X:
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private VideoTextureView1 As VideoTextureView
Dim presenter As VideoTexturePresenter
Dim source As VideoSource
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")
presenter.Initialize("Presenter",VideoTextureView1)
presenter.Source = source.Initialize("Source","http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8","agent",64*1024,512)
End Sub
Sub Presenter_onError(error As String)
Log($"onError(${error})"$)
End Sub
Sub Presenter_onStateChanged(playWhenReady As Boolean, playbackState As Int)
Log($"onStateChanged(${playWhenReady},${playbackState})"$)
End Sub
Sub Presenter_onVideoSizeChanged(width As Int, height As Int, pixelWidthHeightRatio As Float)
Log($"onVideoSizeChanged(${width}x${height},${pixelWidthHeightRatio})"$)
End Sub
Sub Activity_Resume
presenter.play
End Sub
Sub Activity_Pause (UserClosed As Boolean)
presenter.pause
End Sub
This Library is, as of the info on github, Experimental. Don´t expect much here. I just tried to do a wrap for it to see if it works...
Please note It is using an old version of the player. V1.5.9
You need a aar (the player) additional to this lib. Download here
So, here it is. Have fun with it