Open kushalmaniyar opened 4 years ago
Hello,
Do you provide audio parsing ?
Application-level solution
func languageSelection() {
guard let selectionGroup = player.playerLayer?.player?.currentItem?.asset.mediaSelectionGroup(forMediaCharacteristic: .audible) else {
return
}
/**
Supported auido list availble in array
*/
let laguages : [AVMediaSelectionOption] = selectionGroup.options
/*
Select respective language from array index.
*/
player.playerLayer?.player?.currentItem?.select(laguages.first, in: selectionGroup)
}
Library Level
open lazy var selectionGroup : AVMediaSelectionGroup? = {
return player?.currentItem?.asset.mediaSelectionGroup(forMediaCharacteristic: .audible)
}()
open lazy var languages : [AVMediaSelectionOption] = {
return selectionGroup?.options ?? []
}()
Check List
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.
BMPlayer version
Installed with
Issue Description
What
How to extract language from m3u8 URL.
Reproduce
https://5a8ea362056bf.streamlock.net:1936/vodtoken/smil:E_vod.smil/playlist.m3u8
The above URL contains two languages, How can I extract language options and change the language?
when I open this URL in safari it allows me to choose a language. Can you please give me the process of how to extract the m3u8 file?
Thanks in advance. Kushal