INNER CODE UNIT · Swift
getSecondsFromCMTime
florent37/Flutter-AssetsAudioPlayer · darwin/Classes/Music.swift:724
func getSecondsFromCMTime(_ time: CMTime) -> Double {
return self.getMillisecondsFromCMTime(time) / 1000;
}
@objc func handleInterruption(_ notification: Notification) {
#if os(iOS)
if(!self.audioFocusStrategy.request) {
return
}
guard let userInfo = notification.userInfo,
let typeValue = userInfo[AVAudioSessionInterruptionTypeKey] as? UInt,
let type = AVAudioSession.InterruptionType(rawValue: typeValue) else {
return
}
// Switch over the interruption type.
switch type {