Skip to content

Commit dcfefa8

Browse files
authored
Merge pull request #297 from birdmichael/master
✨ Add `m3u8` play without cache support
2 parents bf98bd7 + 5511c44 commit dcfefa8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Source/BMPlayerItem.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ open class BMPlayerResourceDefinition {
6161

6262
open var avURLAsset: AVURLAsset {
6363
get {
64-
return url.isFileURL ? AVURLAsset(url: url) : BMPlayerManager.asset(for: self)
64+
guard !url.isFileURL, url.pathExtension != "m3u8" else {
65+
return AVURLAsset(url: url)
66+
}
67+
return BMPlayerManager.asset(for: self)
6568
}
6669
}
6770

0 commit comments

Comments
 (0)