Questions tagged [exoplayer]
ExoPlayer is an application level media player for Android. It provides an alternative to Android’s MediaPlayer API for playing audio and video both locally and over the Internet. Including DASH and SmoothStreaming adaptive playbacks.
1,898
questions
1
vote
0
answers
14
views
Media app custom actions in Android Auto makes the playback view unresponsive
I have an app that uses ExoPlayer to play audio. Now, I'm working on adding the support for Android Auto. But, after adding the custom actions to support rewind and fast forward, when I play a media ...
0
votes
0
answers
8
views
Exoplayer how to retry from beginning
I have a simple ExoPlayer, I load it as the following code:
List<MediaItem> mediaItems = new ArrayList<>(playlist.size());
for (String url : playlist) {
mediaItems.add(MediaItem....
0
votes
0
answers
12
views
Why can't Exoplayer find hardware codec?
I am developing a simple media player using Exoplayer.
However, the problem is that some hardware codecs cannot be used in Exoplayer.
The device is a TV Box device and has a built-in Dolby AC4 Decoder....
0
votes
0
answers
22
views
java.lang.NullPointerException on getPackageName() in exoplayer android
I want to stream video and for that I use ExoPlayer. But there is an error that I couldn't avoid. in firebase, an error is reported like the one below...
Fatal Exception: java.lang....
0
votes
0
answers
7
views
Add automatic caption for audio-only ExoPlayer
I am creating an audio player and need to add subtitles for it but since I do not have the text I thought of generating automatic captions.
So far I have seen it used only for videos. Is there any way ...
0
votes
1
answer
17
views
media3/exoplayer not fullscreen
I'm trying to create a fullscreen player using media3/exoplayer but there is a gap between the player and the screen; see image below:
This is my activity, it is simple, and it used to work three ...
0
votes
1
answer
15
views
Cannot select "None" subtitle option on ExoPlayer
I use ExoPlayer to play videos in my app, subtitles of which I fetch through some API endpoint. They show up just fine, with the first one autoselected, however, when trying to disable the subs, by ...
0
votes
1
answer
15
views
Migrate exoplayer exoplayer.downloadService.action.RESTART to media3
The Exoplayer states this requirement for "MyDownloadService"
<action android:name="com.google.android.exoplayer.downloadService.action.RESTART"/>
How to migrate it to ...
0
votes
0
answers
7
views
ExoPlayer Can't Run Redirect Script
I can't run Script ExoPlayer, when I add the link, it gives 403 Error, but when I try to download, there is no problem. Which codes will I change the player?
URL
https://disk.swixtream.info/https://...
0
votes
0
answers
33
views
Listen to the reason of onPlayWhenReadyChanged of ExoPlayer from MediaBrowser in Media3
I want to use ExoPlayer.setPauseAtEndOfMediaItems, and listen to the event when auto stopped.
The document says that:
Sets whether to pause playback at the end of each media item.
This means the ...
1
vote
0
answers
20
views
Play Twitch stream on exoplayer android app
I'm trying to develop an Android application on Java which plays two Twitch streams on same time. I've decided to use Exoplayer because it has good video stream support.
I created this method which I ...
0
votes
0
answers
48
views
android exoplayer2 not playing some videos with specific codecs mp4a.40
i have an android tv application containing exoplayer library which play multiple udp streamers.
the problem is some videos doesnt play at all, my device is Amlogic tv box q96
below are the 2 ...
0
votes
1
answer
17
views
Exoplayer video zooms in after seeking
I'm using the exoplayer to play an hls stream. When it loads initially it looks fine, but after calling seekBack, seekForward, or seekTo, the video scaling seems to stop working correctly.
Before:
...
0
votes
0
answers
17
views
How to make Composables containing Android View respect zIndex when placed inside a Box Layout?
I am trying to stack Composables that contain AndroidView. However they seem to not respect the zIndex in a Box Layout. The newest composable associated with lowest zIndex always renders at the top ...
0
votes
0
answers
17
views
ExoPlayer for Android: timeline position is not updated when playing UDP video stream
I'm using ExoPlayer for android, version 2.15.1 for playing UDP video stream.
Timeline position is not updated when playing UDP video stream.
I've managed to play UDP stream in ExoPlayer but I need to ...
0
votes
0
answers
14
views
ExoPlayer throwing OutOfMemory on simple video playback from local raw files on Compose
I've encountered a crash on ExoPlayer playback on lower Android versions, like 8.1, 9 (both emulators and phisical phones), while it's working on emulator API 31 without issues. Using Compose for all ...
0
votes
0
answers
19
views
How to add selectable subtitles to a YouTube video in Android Studio
I have been using this video player to load the videos on the app, but I am open to using Exoplayer or any other that is capable of loading YouTube videos over the internet. The important thing is ...
0
votes
2
answers
38
views
Download Dash to mp4 with exoplayer
I want to download a video that is in Dash format using exoplayer. The following code downloads the video for me but in multiple files.
import android.app.Notification
import android.os.Environment
...
0
votes
1
answer
116
views
error: cannot find symbol import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory
There is an error when building project
error: cannot find symbol
import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory;
^
symbol: class DefaultHttpDataSourceFactory
location: ...
0
votes
0
answers
22
views
ExoPlayer TextRenderer Track Missing
With ExoPlayer 2.18.2 I'm initializing a DefaultTrackSelector
trackSelector = DefaultTrackSelector(requireContext())
And attaching it to a player
private fun createContentPlayer() {
val ...
0
votes
1
answer
63
views
media3 MediaSessionService dont start and crash after few seconds
I am trying to implement media3 mediaSessionService and play music. But service dont start, i dont see notification and after approximately 10sec app is crashing. I am using Sumsung a70 android 11.
...
0
votes
0
answers
15
views
How to play 5 videos in row on button press using exoplayer ConcatenatingMediaSource
I am trying to implement exoplayer on button click will play next video in concate list
but it only play the first video but not the other four what i am doing wrong
next_button.setOnClickListener(v -&...
0
votes
1
answer
64
views
Exoplayer Subtitle
Hi I'm trying to add Subtitle for audio
using data of https://grepp-programmers-challenges.s3.ap-northeast-2.amazonaws.com/2020-flo/song.json
playing audio and setting the PlayerControlView was fine ...
0
votes
0
answers
14
views
ExoPlayer's TimelineQueueNavigator.getMediaDescription method giving wrong index that results in crash due to IndexOutOfBoundsException
When play a first song in the list it work well put when try play another song it crash.
The problem in windowIndex can't be size: 3 and because I tried replace it with number 2 and it work but still ...
0
votes
1
answer
54
views
Exo Player: How to allow our video stream urls to be played only by our apps?
We have video content hosted on our server and these video stream urls can be played from any where
Ex:
From our http://ourwebsite.com using video player
From our android app using exo player
From ...
0
votes
0
answers
37
views
Android: Media notification
I am working on a music application, and I am showing the media details on notification with media action buttons, now when I run my app on android 12, I see everything working as intended, but on ...
0
votes
1
answer
50
views
How to show ExoPlayer in RecyclerView
In my application I want show ExoPlayer in RecyclerView and for this I write below codes.
I want show video thumbnail on video and write below codes in XML:
My recyclerview items layout:
...
0
votes
1
answer
36
views
How can i pre-load and update for each current MediaItem from an API in ExoPlayer?
I have an android project that gives me an API of a music playlist without urls (just ids, titles and images) and has another API that will give me music detail by id including url and other ...
0
votes
1
answer
70
views
How to reposition Jetpack-media3/exoplayer control buttons?
I am using exoplayer2 via androidx.media3:media3-exoplayer:1.0.0-beta03. I have a androidx.media3.ui.PlayerView in my XML layout, and then in my code I am creating an Exoplayer with ExoPlayer.Builder ...
3
votes
1
answer
106
views
Why do Jetpack-media3/exoplayer controls dim the video?
I am using exoplayer2 via androidx.media3:media3-exoplayer:1.0.0-beta03. I have a androidx.media3.ui.PlayerView in my XML layout, and then in my code I am creating an Exoplayer with ExoPlayer.Builder ...
0
votes
1
answer
47
views
I am using ExoPlayer 2.16.1 and I cannot import DefaultHttpDataSource
I'm getting an error like "java.lang.IllegalArgumentException: no TLS versions for cleartext connections" in my project and I need to use "DefaultHttpDataSourceFactory" to fix it, ...
5
votes
0
answers
162
views
How to integrate Audio ad with Exoplayer like Spotify?
I want to integrate Audio ads into my podcast app with the interval of 3 podcasts. After every 3 podcasts, I need one specific ad to play which could be skippable or non-skippable.
For integration, I ...
1
vote
0
answers
54
views
Android Media3 Session & Controller - Playback with merging media source
I'm trying to use a media session in my app to make background playback and notifications and all that work. The problem is that the documentation isn't very good and there's missing features. The ...
1
vote
0
answers
102
views
AES/ECB/PKCS5Padding encrypted video with exoplayer android (JAVA/KOTLIN)
I am trying to download a video file and encrypt it while downloading then play it using Exoplayer when I search for how to play AES Video I found I must make my own DataSource. then I try to ...
0
votes
0
answers
11
views
Instagram style post(multiple media in single item) implementation using Recyclerview & Exoplayer
I want to make a recycler view that can show multiple media in each recycler view item. Like instagram post i want to show video & images in a single recycler view item. I don't know how i can ...
1
vote
0
answers
53
views
ExoPlayer HLS stream AD insertion
I have HLS stream. When I trying insert VAST tag into stream :
exoplayer not show AD with any errors and warnings in logcat
exoplayer throwing exception, and after re-init with HlsMediaSource.Factory(...
0
votes
1
answer
22
views
Animation while playing media with ExoPlayer
so im trying to make a video player that plays media on a fraction of the screen while the remaining fraction of the screen shows different images. I am trying to tackle this using animation list:
<...
0
votes
0
answers
19
views
Scroll to top not working smoothly on viewPager2 after loading multiple videos
I have a viewPager2 in a fragment and bottom nav on activity when clicking Home button i am using scroll to top when i click home after scroll upto 3 videos it scroll to top perfectly but after load ...
0
votes
0
answers
12
views
How can I change the textColor, textFont & textPosition of subtitles in exoPlayer android?
How can I change the textColor, textFont & textPosition of subtitles in exoPlayer 2.18.2
How can I change this attributes?
0
votes
1
answer
52
views
How to set volume in ExoPlayer? SimpleExoPlayer had setVolume() api but SimpleExoPlayer is deprecated now
I'm using two ExoPlayer instances. I need to set custom volume to one of the ExoPlayer instances.
Previously, I was using SimpleExoPlayers. Now I want to use ExoPlayer because SimpleExoPlayer is ...
0
votes
1
answer
139
views
android exoplayer video with high resolution not playing and buffering well why?
I have android tv application playing 2 different videos udp streaming using Exoplayer, the below images(image1 and image2) show the specifications of every video .. First one with low resolution play ...
0
votes
0
answers
49
views
Cannot play audio with ExoPlayer during an ongoing call
I have a basic ExoPlayer project which plays and pauses audio. I'm passing handleAudioFocus as true in setAudioAttributes while initializing ExoPlayer to let it handle the audio focus by itself. But ...
0
votes
0
answers
40
views
How to make rounded exoplayer view in android
When I add the player view full height and width then it go outside the card view which has corner radius.
<androidx.cardview.widget.CardView
android:id="@+id/clVideo"
...
0
votes
0
answers
51
views
Exoplayer Dolby playback issues with dynamic ad insertion
Im playing a DAI supported DASH stream with Exoplayer 2.18.1 (on firetv 4k) where the multi-period manifest gets stitched with the ad period. The ad period sometimes have dolby (stereo or 5.1) audio ...
0
votes
1
answer
49
views
Where to initialize exoplayer?
Currently I create my exoplayer player object in my viewmodel using the builder class. Is this the correct way, or should I instead create a single instance of the player and use dependency injection ...
0
votes
1
answer
121
views
How to play m3u8 file in flutter. | Exoplayer 403 user_agent rejection error
I am new on flutter. I am trying to integrate video player in my app which can play m3u8 video but only some file can play when they only exoplayer user_agent.
and when I shift to webview than it's ...
0
votes
0
answers
17
views
How do I add audio tracks on a MediaItem on ExoPlayer?
I'm basically trying to achieve the dub functionality in a video player, using ExoPlayer, however, I can't figure out how to add multiple audio tracks to a video.
I've tried creating multiple ...
0
votes
0
answers
58
views
How to set custom header referer in exoplayer?
I trying to add custom referer as header top play m3u8 in exoplayer. I searched many method is not compatible with my source code i have.
if (uri.getLastPathSegment().contains("m3u8") || uri....
0
votes
0
answers
56
views
Pause previous video on Scroll of RecyclerView in Android Kotlin
`I am using Recycler View and inside the recycler view i am using the exo player
I want pause video on scroll on recycler view but the multiple videos are playing
Main Activity Code
...
0
votes
0
answers
42
views
Is ExoPlayer’s audio offload mode supported while using MediaSessionService from Media3?
I am working on a native music player app for android using ExoPlayer and MediaSessionService from Media3. Now I want to make playback more energy efficient while the screen is off by using ...