任何人都可以向我推荐一个适用于 iOS 10 的 m3u8 解析器。我使用了这个,但它给了我错误
M3U8_BASE_URL undecleared indentifier, No visible interface declared in NSString for isExtendedM3Ufile 这类错误,超过 17
在NSString+m3u8.m
. 我想将 m3u8 文件传递给AudioStreamer。
请帮我。谢谢
任何人都可以向我推荐一个适用于 iOS 10 的 m3u8 解析器。我使用了这个,但它给了我错误
M3U8_BASE_URL undecleared indentifier, No visible interface declared in NSString for isExtendedM3Ufile 这类错误,超过 17
在NSString+m3u8.m
. 我想将 m3u8 文件传递给AudioStreamer。
请帮我。谢谢
然后将 m3u8 文件 URL 指向 M3U8PlaylistModel
let playlistModel = M3U8PlaylistModel(url: self.m3u8_url)
guard let m3u8PlaylistModel = playlistModel else {
return
}
guard let masterPlaylist = m3u8PlaylistModel.masterPlaylist else {
return
}
guard let streamList = masterPlaylist.xStreamList else {
return
}
streamList.sortByBandwidth(inOrder: .orderedAscending)
for i in 0 ..< streamList.count {
if let extXStreamInf = streamList.xStreamInf(at: i){
/* you can get below properties, using this extXStreamInf object
@property (nonatomic, readonly, assign) NSInteger bandwidth;
@property (nonatomic, readonly, assign) NSInteger programId; // removed by draft 12
@property (nonatomic, readonly, copy) NSArray *codecs;
@property (nonatomic, readonly) MediaResoulution resolution;
@property (nonatomic, readonly, copy) NSString *audio;
@property (nonatomic, readonly, copy) NSString *video;
@property (nonatomic, readonly, copy) NSString *subtitles;
@property (nonatomic, readonly, copy) NSString *closedCaptions;
@property (nonatomic, readonly, copy) NSURL *URI;
*/
}
}