Abstract away the MediaPlayer logic in ChatActivity to MediaPlayerManager #4563
Open
Description
Will likely require rewriting the MediaPlayerManager to be compatible with the more complicated functionality in ChatActivity (cycling through messages, marking messages as played, restoring state etc). I think a state machine (with an exposed enum) and some callbacks to observe should do the trick.
Will be helpful for eventually removing ChatKit, and replacing it with a full compose solution. The more functionality handled outside of ChatActivity the better.
Functionality to replicate:
- Resumes playback of VoiceMessages on screen rotation and continue playing a voice message if chatActivity in background but still open #3704
- Auto play consecutive audio messages, prefetch audio messages, show fetched audio durations, temporarily mark as listened audio messages, fixed a bug to listen last second of audio message #4549
- Add playback speed control to voice messages #4482