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 ios infinite loop when timerange does not exist #209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sepperousseau
Copy link

Summary

When I loaded a .m3u8 file which was 0 seconds.
The AudioPlayer.m went into an infinite loop.
It was checking for timeRanges which was never there.
This way we couldn't destroy the audio player.

If the loadedTimeRanges.firstObject is nil and status is AVPlayerItemStatusReadyToPlay. The player should have loadedTimeRanges. When this is not the case we should return with error.
Otherwise we stay in the infinite loop.

Test Plan

What's required for testing (prerequisites)?

A .m3u8 file which is has 0 seconds.
Not sure how long this url will be valid.

https://content.mediadistillery.tv/api/3/playout/097506e997b9445b38cf86961affd195a864522d25a536ed650dbbb4d93b89c5879e756c211239a5c04d72546869732069792061207784.m3u8?protocol=https&cursor=0

What are the steps to reproduce (after prerequisites)?

Load the provided url.

Compatibility

OS Implemented
iOS

Checklist

  • I have tested this on a device and a simulator
  • I mentioned this change in CHANGELOG.md

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.

None yet

1 participant