B4A Library Exoplayer 2.18.5 Streams Player

Hi, This is Based on the Wrapper of Erel .
I was in need to use the latest Exoplayer for only one purpose is to play RTMP Streams.
also this Exoplayer Replaces deprecated playerview with StyledPlayerView.

You need this Additional Following AArs to be located in your Additional Libraries Folder in order to use this library.

Version 1.40 required aar.

Additional AAR 2.18.2

Version 1.50 required aar.
Additional AAR 2.18.3

Version 1.60 required aar.
Additional AAR 2.18.4

Version 1.70 required aar.
Additional AAR 2.18.5

Functionality :
  • CreateUriSource
  • CreateSmoothStreamingSource
  • CreateHLSSource
  • CreateDashSource
  • CreateFileSource
  • CreateRtspStreamingSource
  • CreateRtmpStreamingSource
  • CreateUdpStreamingSource
  • CreateListSource
  • setReapeatMode
  • getIsPlaying
  • Prepare
  • Play
  • Pause
  • Release
  • getPosition
  • setPosition
  • getDuration
  • getVolume
  • setVolume
  • getCurrentMediaItemIndex
  • GetvideoFormatwidth
  • GetvideoFormatHeight
  • GetAudioTracksLanguages
  • GetVideoTrackSubtitles
  • preferedAudioLanguage
  • preferedtextLanguage
  • EnableSubtitles


DesignerProperties

  • SPlayerView
  • ResizeMode [FIT|FIXED_HEIGHT|FIXED_WIDTH]
  • UseController default is true
  • ShowBuffering [NEVER|PLAYING|ALWAYS] default is NEVER
  • ControllerTimeout default is 5000
I may Extends More functionality in the future .

Requires Appcompat Library

Example is included.

Events :

  • Player_Ready
  • Player_Error
  • Player_Complete
  • IDLE
  • Buffering
Update Version 1.40
  • FFMPEG Extension is Supported
  • FFmpegavailabe << to check weather ffmpeg is available or not.
  • FFMPEG Initialize Choice during initialization Prefer To use FFMPEGAUDIO Decoding only for now
  • player.Initialize("player", UseFFmpeg as boolean, FFMPEGAUDIO As boolean, FFmpegVideo As Boolean)
  • FFMPEG AUDIO AND VIDEO Decoder
Updated Version 1.50
Upgrade to latest exoplayer 2.18.3

Change Log

Updated Version 1.60
  • Upgraded to the latest ExoPlayer 2.18.4 > Change Log
  • Fixed GetvideoFormatwidth, GetvideoFormatHeight when playing media without video it will return -1 if the media doesn't have video.
  • Added Stop method to stop the player.
Updated Version 1.70
  • Upgraded to the latest ExoPlayer 2.18.5
  • Added IDLE EVENT and Buffering Event.
download additional aar to use the latest exoplayer fixes.
 

Attachments

  • addoexo-1.40.zip
    22 KB · Views: 285
  • addoexo-1.50.zip
    22 KB · Views: 185
  • addoexo-1.60.zip
    22 KB · Views: 211
  • addoexo-1.70.zip
    22.1 KB · Views: 410
Last edited:

Addo

Well-Known Member
Licensed User
Do it more than one time, stream1, stream2, stream1, stream2... and sooner or later should give you an error... at least, here happens (with mi9tpro, x86emulator and a generic android 8.0 device).
Will give it a deep look probably your case implies that something is happening between the stream and the player during reading the stream or the server that holds the stream have some limitations hard to say now probably i can take more deep look in the morning will see.
 

Addo

Well-Known Member
Licensed User
Do it more than one time, stream1, stream2, stream1, stream2... and sooner or later should give you an error... at least, here happens (with mi9tpro, x86emulator and a generic android 8.0 device).
Now I am 100% sure that the issue lies to the server that you are keep requesting those media From, AS I SAID IT IS A LIMITATION OF THE SERVER THAT HOLDS YOUR MEDIA. it does not related to EXOPLAYER or even the wrapper. just tried with other streams on my own server and it does work normally even with the bad design button clicks. please next time post an issue related to the wrapper or even the exoplayer itself so we can avoid this kind of confusion. Your example with Different Videos From YouTube. those links in the example will expire sooner or later so try with other streams..
 

Attachments

  • ExoPlayerTest.zip
    13.5 KB · Views: 145
Last edited:

Zero7

Member
Now I am 100% sure that the issue lies to the server that you are keep requesting those media From, AS I SAID IT IS A LIMITATION OF THE SERVER THAT HOLDS YOUR MEDIA. it does not related to EXOPLAYER or even the wrapper. just tried with other streams on my own server and it does work normally even with the bad design button clicks. please next time post an issue related to the wrapper or even the exoplayer itself so we can avoid this kind of confusion. Your example with Different Videos From YouTube. those links in the example will expire sooner or later so try with other streams..
I don't want to contradict what you said about the server, but this is already tested and works just fine. I did a test in Android x86 emulator with Dream Player IPTV app with the links I sent to you in the project and others more to test, and is works ALWAYS, even changing fast from one channel to another. The Dream Player IPTV is using ExoPlayer as video engine. That's told me that the problem is NOT in the server.

You cannot fix it, that's no a problem, you're doing it for free for all of us... thank you for this and to try to fix it anyway. I will not disturb you more with this.

PS: Your project works ALWAYS with these kind of links and with the type of stream type.
 

Addo

Well-Known Member
Licensed User
I don't want to contradict what you said about the server, but this is already tested and works just fine. I did a test in Android x86 emulator with Dream Player IPTV app with the links I sent to you in the project and others more to test, and is works ALWAYS, even changing fast from one channel to another. The Dream Player IPTV is using ExoPlayer as video engine. That's told me that the problem is NOT in the server.

You cannot fix it, that's no a problem, you're doing it for free for all of us... thank you for this and to try to fix it anyway. I will not disturb you more with this.

PS: Your project works ALWAYS with these kind of links and with the type of stream type.
I will repeat myself again.THIS IS NOT AN ISSUE WITH Exoplayer or even related to the Wrapper now you claim that what you so called an issue is now WORKING, There is nothing to be fixed here neither for Exoplayer source or even for the Wrapper, with that being said the issue lies in your server that holds your media and its limitations to handle requests thats why when put a sleep or even wait for is always plays those media..and lastly next comments should be related to a valuable issues related to the Wrapper, not a discussion about what you so called unable of fixing some illusion that you face.
 

Enxix

Member
Hello, I want to add one more functionality to the library through javaobject but when I do it gives me an error.
I want to know how I get the instance of the exoplayer that you are using.

java.lang.RuntimeException: Method: setLoadControl not found in: com.addo.exoplayerwrapper.SPlayer

obviously om.addo.exoplayerwrapper.SPlayer is not the class I want to instantiate but the one of the exoplayer. You understand me?
 

nedium

Active Member
Licensed User
Longtime User
Hello @PassionDEV,

I wanted to ask if there is a way to get the meta data that can be obtained by any url that can be played (name, image and current stream, or whatever data it might have).
As always thank you very much for your time.

example
 

amer bashar

Member
Licensed User
Please is there any way to change the buffer value? I have to start playing the stream faster therefor it must be less buffer size
I tried this on exoplayer and it didn`t helped
thank you
 
Top