Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix video height and width is undefined when playing HLS in ios #1933

Closed
wants to merge 1 commit into from

Conversation

ming436534
Copy link

Provide an example of how to test the change

Test with HLS, example: https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8

Describe the changes

As the number of video asset in player item is zero when playing HLS, we need to get the video size by _playerItem.presentationSize

####Related Issues
#1194

} else {
// As HLS items would not have video track, we need another way to get the video size
width = [NSNumber numberWithFloat:_playerItem.presentationSize.width];
height = [NSNumber numberWithFloat:_playerItem.presentationSize.height];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe calculate orientation as well?
orientation = width > height ? @"landscape" : @"portrait";

@elizabethlofredo
Copy link

elizabethlofredo commented Apr 20, 2020

Hi! Any ideas about when this is going to be merged? I really need this

@jenshandersson
Copy link
Contributor

Closing this in favour of #1992 as I didn't hear back from contributor and changelog was missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants