Re-enables HLS support (can't use AVAsset for HTTP live stream media).

This commit is contained in:
Robin Chou
2016-04-18 22:38:47 -04:00
parent 103506beec
commit bdd4baf933

View File

@@ -89,7 +89,11 @@
[self removePlayerItemObservers];
if (_asset) {
_currentPlayerItem = [[AVPlayerItem alloc] initWithAsset:_asset];
if ([_asset.tracks count]) {
_currentPlayerItem = [[AVPlayerItem alloc] initWithAsset:_asset];
} else {
_currentPlayerItem = [[AVPlayerItem alloc] initWithURL:((AVURLAsset *)_asset).URL];
}
}
if (_currentPlayerItem) {