fix(android): fix onVideoLoad event field key (#4001)

* fix(android): fix onVideoLoad event naturalSize field key

* fix(android): fix onVideoLoad event currentTime field key
This commit is contained in:
YangJH 2024-07-15 17:14:56 +09:00 committed by GitHub
parent 05623c9f54
commit f82268be1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -104,10 +104,10 @@ class VideoEventEmitter {
onVideoLoad = { duration, currentPosition, videoWidth, videoHeight, audioTracks, textTracks, videoTracks, trackId -> onVideoLoad = { duration, currentPosition, videoWidth, videoHeight, audioTracks, textTracks, videoTracks, trackId ->
event.dispatch(EventTypes.EVENT_LOAD) { event.dispatch(EventTypes.EVENT_LOAD) {
putDouble("duration", duration / 1000.0) putDouble("duration", duration / 1000.0)
putDouble("playableDuration", currentPosition / 1000.0) putDouble("currentTime", currentPosition / 1000.0)
val naturalSize: WritableMap = aspectRatioToNaturalSize(videoWidth, videoHeight) val naturalSize: WritableMap = aspectRatioToNaturalSize(videoWidth, videoHeight)
putMap("seekableDuration", naturalSize) putMap("naturalSize", naturalSize)
putString("trackId", trackId) putString("trackId", trackId)
putArray("videoTracks", videoTracksToArray(videoTracks)) putArray("videoTracks", videoTracksToArray(videoTracks))
putArray("audioTracks", audioTracksToArray(audioTracks)) putArray("audioTracks", audioTracksToArray(audioTracks))