B4A Library addoMedia3 - AndroidX Media3 Exoplayer Wrapper

Addo

Well-Known Member
Licensed User
Longtime User
Version 1.3
  • Updated Media3 to latest version 1.2.0
  • Removed CreateListSource Method since ConcatenatingMediaSource is deprecated in version 1.2.0.
  • Added a new method PlayList to adapt the new mechanism to play a list of mediasources in the new version.
  • Added a new method clearMediaItems.
Example Updated as well.
its required to redownload the AAR files from the link in the first post.
 
Last edited:

Addo

Well-Known Member
Licensed User
Longtime User
Updated Media3 to the latest 1.3.1

Updated to version 1.4

  • Fixes an incompatibility between ExoPlayer and Firebase. Make sure to update the additional libs package.
Important Note Additional aar files must be place in a folder with name addoexo.
 

nedium

Active Member
Licensed User
Longtime User
hi @Addo , thanks your great work

I wanted to know if it could be verified

-GetAudioTracksLanguages
-GetVideoTrackSubtitles

since in some playbacks it does not detect some tracks and in vlc it does sample them and they work.

thank you
 

Scantech

Well-Known Member
Licensed User
Longtime User
Thanks for the library. It has more features than the other media3 library. Any chance supporting This
 

Addo

Well-Known Member
Licensed User
Longtime User
updated to version 1.7
  • Added a new view addoMedia3TexureView based on TextureView.
  • Added GetVideoTextLanguages2
  • Added GetAudioTracksLanguages2
  • Added SetTextLanguage2
  • SetAudioLanguage2
  • Added Event_GetVideoTextLanguages2(Subtitles As Map)
  • Added Event_Getaudiolanguages2(audiotracks As Map)
As mentioned in this thread there was issue on setting and retrieving the correct supported languages for audio and subtitles use GetVideoTextLanguages2 and GetAudioTracksLanguages2 to retrieve the correct language information.

The TextureView is a new view added to gives the ability to rotate the player as mentioned here. the down side of using textureview that the subtitle in videos will not be visible.

Example Updated to describe the usage of both views.
 
Last edited:

byz

Active Member
Licensed User
How to achieve efficient timing screenshots please. The time interval is in milliseconds, because the image needs to be processed and sent to the server.
This is useful for applications where real-time video monitoring is required.
 
Last edited:

Almora

Well-Known Member
Licensed User
Longtime User
hello can we get a screenshot? Is there such a feature?
 

nedium

Active Member
Licensed User
Longtime User
Hello @Addo , the 2 new ways to obtain the audio and subtitles

Added Event_GetVideoTextLanguages2(Subtitles As Map)
Added Event_Getaudiolanguages2(audiotracks As Map)

they work well.

But could it be added or I don't know if there is an option that if I select a subtitle and I no longer want to use it, how could I remove or disable it?

thanks for your work
 

Addo

Well-Known Member
Licensed User
Longtime User
updated to version 1.9

  • Removed the internal dependencies so you can add them selectively as #AdditionalJar in b4a IDE to avoid conflicts with other libraries.
also this gives possibility to upgrade the media3 AAR to the newest version as long as the codebase has the same functionality without deprecation.

Example adding additional libs in b4a:
#Region Additional libs

#AdditionalJar: addoexo/media3-common-1.3.1.aar
#AdditionalJar: addoexo/media3-container-1.3.1.aar
#AdditionalJar: addoexo/media3-database-1.3.1.aar
#AdditionalJar: addoexo/media3-datasource-1.3.1.aar
#AdditionalJar: addoexo/media3-datasource-rtmp-1.3.1.aar
#AdditionalJar: addoexo/media3-decoder-1.3.1.aar
#AdditionalJar: addoexo/media3-exoplayer-1.3.1.aar
#AdditionalJar: addoexo/media3-exoplayer-dash-1.3.1.aar
#AdditionalJar: addoexo/media3-cast-1.3.1.aar
#AdditionalJar: addoexo/media3-exoplayer-hls-1.3.1.aar
#AdditionalJar: addoexo/media3-exoplayer-rtsp-1.3.1.aar
#AdditionalJar: addoexo/media3-exoplayer-smoothstreaming-1.3.1.aar
#AdditionalJar: addoexo/media3-extractor-1.3.1.aar
#AdditionalJar: addoexo/media3-ui-1.3.1.aar
#AdditionalJar: addoexo/rtmp-client-3.2.0.aar
#AdditionalJar: addoexo/guava-31.1-android-without-listenable.jar
#AdditionalJar: androidx.recyclerview:recyclerview
#AdditionalJar: androidx.customview:customview-poolingcontainer
#AdditionalJar: androidx.media:media
#AdditionalJar: com.google.guava:listenablefuture

#End Region
 
Last edited:

Almora

Well-Known Member
Licensed User
Longtime User
Hello. I tried the example on the first page. The problem still persists. When FireBaseAdmob2 is added, it gives an error.
 

Addo

Well-Known Member
Licensed User
Longtime User
First of all you need to show your project or minimal example because i can't see the project source from this image. Better upload minimal example so i can reproduce the issue you face and see how you setup the project.
 

Almora

Well-Known Member
Licensed User
Longtime User
#AdditionalJar: addoexo/guava-31.1-android-without-listenable.jar

if I remove this it compiles.
 

Attachments

  • exoplayer-test.zip
    10.4 KB · Views: 31

Addo

Well-Known Member
Licensed User
Longtime User
if I remove this it compiles.
And thats the reason behind i did this update to be able to avoid duplicate dependencies. If Firebase using this dependence which indeed does so no need to include it as a part of the additional jars since its been included already in another library, maybe in future b4a updates this can be avoided.
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…