Skip to content

Commit 120a7d7

Browse files
committed
fix: ensure Exo Player controls run on the main thread
1 parent f057b1d commit 120a7d7

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

android/app/src/main/kotlin/nl/jknaapen/fladder/messengers/VideoPlayerImplementation.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,15 @@ class VideoPlayerImplementation(
140140
}
141141

142142
override fun play() {
143-
player?.play()
143+
Handler(Looper.getMainLooper()).post {
144+
player?.play()
145+
}
144146
}
145147

146148
override fun pause() {
147-
player?.pause()
149+
Handler(Looper.getMainLooper()).post {
150+
player?.pause()
151+
}
148152
}
149153

150154
override fun seekTo(position: Long) {

0 commit comments

Comments
 (0)