Fix video dimensions for HLS streams

This commit is contained in:
Jens Andersson
2020-05-05 17:49:42 +02:00
parent 1ecb09acc4
commit cc2e9c42fa
2 changed files with 5 additions and 0 deletions

View File

@@ -638,6 +638,10 @@ static int const RCTVideoUnset = -1;
} else {
orientation = @"portrait";
}
} else if (_playerItem.presentationSize.height) {
width = [NSNumber numberWithFloat:_playerItem.presentationSize.width];
height = [NSNumber numberWithFloat:_playerItem.presentationSize.height];
orientation = width > height ? @"landscape" : @"portrait";
}
if (self.onVideoLoad && _videoLoadStarted) {