feat: add isSeeking to onPlaybackStateChanged (#3899)
* feat: add `isSeeking` to `onPlaybackStateChanged`` * refactor `onSeek` event emit logic * fix rebase
This commit is contained in:
@@ -69,7 +69,7 @@ class VideoEventEmitter {
|
||||
lateinit var onVideoError: (errorString: String, exception: Exception, errorCode: String) -> Unit
|
||||
lateinit var onVideoProgress: (currentPosition: Long, bufferedDuration: Long, seekableDuration: Long, currentPlaybackTime: Double) -> Unit
|
||||
lateinit var onVideoBandwidthUpdate: (bitRateEstimate: Long, height: Int, width: Int, trackId: String) -> Unit
|
||||
lateinit var onVideoPlaybackStateChanged: (isPlaying: Boolean) -> Unit
|
||||
lateinit var onVideoPlaybackStateChanged: (isPlaying: Boolean, isSeeking: Boolean) -> Unit
|
||||
lateinit var onVideoSeek: (currentPosition: Long, seekTime: Long) -> Unit
|
||||
lateinit var onVideoEnd: () -> Unit
|
||||
lateinit var onVideoFullscreenPlayerWillPresent: () -> Unit
|
||||
@@ -158,9 +158,10 @@ class VideoEventEmitter {
|
||||
putString("trackId", trackId)
|
||||
}
|
||||
}
|
||||
onVideoPlaybackStateChanged = { isPlaying ->
|
||||
onVideoPlaybackStateChanged = { isPlaying, isSeeking ->
|
||||
event.dispatch(EventTypes.EVENT_PLAYBACK_STATE_CHANGED) {
|
||||
putBoolean("isPlaying", isPlaying)
|
||||
putBoolean("isSeeking", isSeeking)
|
||||
}
|
||||
}
|
||||
onVideoSeek = { currentPosition, seekTime ->
|
||||
|
||||
Reference in New Issue
Block a user