google / google/ExoPlayer

Playing Audio with Fade In/Out effect

Open
#10,702 2 comments 0 reactions 1 assignee Assigned to @Samrobbo View on GitHub
enhancement
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Previously I was using the Timer() thread to create a Volume Fade In and Fade Out effects while playing the audio and setting up the volume in it. After upgrading to the latest version of ExoPlayer now I am getting the following error message:

> java.lang.IllegalStateException: Player is accessed on the wrong thread.
> Current thread: 'Timer-0'
> Expected thread: 'main'

I understand that ExoPlayer needs to accessed via same thread, but is there a way to create the Volume Fade In/Fade Out effect?

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.