You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I use exoplayer 2.13.1 in my app. after changes on 2.13.0 (2021-02-04)Audio, SimpleExoPlayer.getAudioSessionId is fix and return true SessionId. But after after change MediaItem, getAudioSessionIdreturn 0.
SimpleExoPlayer simpleExoPlayer = new SimpleExoPlayer.Builder(this).setMediaSourceFactory(new DefaultMediaSourceFactory(cacheDataSourceFactory)).build();
simpleExoPlayer.setWakeMode(PowerManager.PARTIAL_WAKE_LOCK);
simpleExoPlayer.addAnalyticsListener(new AnalyticsListener() {
@Override
public void onAudioSessionIdChanged(@NonNull EventTime eventTime, int audioSessionId) {
Log.e("FLAG", "sessionId: " + audioSessionId); // not called
}
});
// on first time prepare: sessionId is true. on second time prepare: sessionId is 0
public void prepare(String audioUrl) {
MediaItem mediaItem = MediaItem.fromUri(audioUrl);
simpleExoPlayer.setMediaItem(mediaItem);
simpleExoPlayer.prepare();
simpleExoPlayer.setPlayWhenReady(true);
}
The text was updated successfully, but these errors were encountered:
Thanks for reporting this! There is indeed a problem where 0 is incorrectly, and we will fix this in a future release. In the meantime, you can rely on the (true) audio session ID not changing unless application code calls SimpleExoPlayer.setAudioSessionId. Hence you can work around the issue by querying it once immediately after the player has been create.
Hello. I use exoplayer 2.13.1 in my app. after changes on 2.13.0 (2021-02-04) Audio,
SimpleExoPlayer.getAudioSessionId
is fix and return true SessionId. But after after change MediaItem,getAudioSessionId
return 0.The text was updated successfully, but these errors were encountered: