fix(android): add support of square video format
This commit is contained in:
parent
a03c7342fb
commit
3675dc2789
@ -160,8 +160,11 @@ class VideoEventEmitter {
|
|||||||
naturalSize.putInt(EVENT_PROP_HEIGHT, videoHeight);
|
naturalSize.putInt(EVENT_PROP_HEIGHT, videoHeight);
|
||||||
if (videoWidth > videoHeight) {
|
if (videoWidth > videoHeight) {
|
||||||
naturalSize.putString(EVENT_PROP_ORIENTATION, "landscape");
|
naturalSize.putString(EVENT_PROP_ORIENTATION, "landscape");
|
||||||
} else {
|
} else if (videoWidth < videoHeight) {
|
||||||
naturalSize.putString(EVENT_PROP_ORIENTATION, "portrait");
|
naturalSize.putString(EVENT_PROP_ORIENTATION, "portrait");
|
||||||
|
} else {
|
||||||
|
naturalSize.putString(EVENT_PROP_ORIENTATION, "square");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
event.putMap(EVENT_PROP_NATURAL_SIZE, naturalSize);
|
event.putMap(EVENT_PROP_NATURAL_SIZE, naturalSize);
|
||||||
event.putString(EVENT_PROP_TRACK_ID, trackId);
|
event.putString(EVENT_PROP_TRACK_ID, trackId);
|
||||||
|
Loading…
Reference in New Issue
Block a user