From f82268be1bc33e5c61dbb031d7937197da0b67e5 Mon Sep 17 00:00:00 2001 From: YangJH Date: Mon, 15 Jul 2024 17:14:56 +0900 Subject: [PATCH] fix(android): fix onVideoLoad event field key (#4001) * fix(android): fix onVideoLoad event naturalSize field key * fix(android): fix onVideoLoad event currentTime field key --- .../java/com/brentvatne/common/react/VideoEventEmitter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/com/brentvatne/common/react/VideoEventEmitter.kt b/android/src/main/java/com/brentvatne/common/react/VideoEventEmitter.kt index c82aef8d..8f29779a 100644 --- a/android/src/main/java/com/brentvatne/common/react/VideoEventEmitter.kt +++ b/android/src/main/java/com/brentvatne/common/react/VideoEventEmitter.kt @@ -104,10 +104,10 @@ class VideoEventEmitter { onVideoLoad = { duration, currentPosition, videoWidth, videoHeight, audioTracks, textTracks, videoTracks, trackId -> event.dispatch(EventTypes.EVENT_LOAD) { putDouble("duration", duration / 1000.0) - putDouble("playableDuration", currentPosition / 1000.0) + putDouble("currentTime", currentPosition / 1000.0) val naturalSize: WritableMap = aspectRatioToNaturalSize(videoWidth, videoHeight) - putMap("seekableDuration", naturalSize) + putMap("naturalSize", naturalSize) putString("trackId", trackId) putArray("videoTracks", videoTracksToArray(videoTracks)) putArray("audioTracks", audioTracksToArray(audioTracks))