Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Cherry-pick] Build AVPlayerItem from the URL for HLS videos
Summary: Upstream PR: facebookarchive#1748 Apple claims in the [[ https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/02_Playback.html | AVFoundationProgramming Guide ]] that HLS videos can be constructed only through URL, but later with [[ https://developer.apple.com/library/ios/releasenotes/AudioVideo/RN-AVFoundation-Old/ | iOS 4.3 release notes ]] it claimed to bring updates to how the HLS videos should be initialized, which works with asset too. I’ve tested with both, and it looks like initializing with asset is buggy. The first initialization would be successful, however if you re-initialize it again within a few seconds, the asset won’t be loaded successfully ([[ https://www.dropbox.com/s/5yqn9nvce2rga1m/HLS_constructed_with_asset.mov?dl=0 | simulator recording ]]). I am reverting this to constructing AVPlayerItem using URL for HLS videos, which solves the bug ([[ https://www.dropbox.com/s/h2b59c2q1jnkb17/HLS_constructed_from_url.mov?dl=0 | simulator recording ]]). This issue has been discussed earlier by others but it didn't seem to work out the way we wanted: facebookarchive#1600 Reviewers: bin, yunnanwu, levi, garrett, schneider Reviewed By: garrett, schneider Subscribers: garrett, levi Differential Revision: https://phabricator.pinadmin.com/D100271
- Loading branch information