From 3675dc27899d1338c4881930c58e3cc9ff59f41e Mon Sep 17 00:00:00 2001 From: olivier bouillet Date: Fri, 5 Aug 2022 19:04:35 +0200 Subject: [PATCH] fix(android): add support of square video format --- .../java/com/brentvatne/exoplayer/VideoEventEmitter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/brentvatne/exoplayer/VideoEventEmitter.java b/android/src/main/java/com/brentvatne/exoplayer/VideoEventEmitter.java index c6ed921e..a86edf1c 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/VideoEventEmitter.java +++ b/android/src/main/java/com/brentvatne/exoplayer/VideoEventEmitter.java @@ -160,8 +160,11 @@ class VideoEventEmitter { naturalSize.putInt(EVENT_PROP_HEIGHT, videoHeight); if (videoWidth > videoHeight) { naturalSize.putString(EVENT_PROP_ORIENTATION, "landscape"); - } else { + } else if (videoWidth < videoHeight) { naturalSize.putString(EVENT_PROP_ORIENTATION, "portrait"); + } else { + naturalSize.putString(EVENT_PROP_ORIENTATION, "square"); + } } event.putMap(EVENT_PROP_NATURAL_SIZE, naturalSize); event.putString(EVENT_PROP_TRACK_ID, trackId);