Skip to content

Interruption Handling Notifications not working #128

Open
@Kedar-27

Description

@Kedar-27

private func setupNotifications() {

let notificationCenter = NotificationCenter.default notificationCenter.addObserver(self, selector: #selector(handleInterruption), name: AVAudioSession.interruptionNotification, object: nil) notificationCenter.addObserver(self, selector: #selector(handleRouteChange), name: AVAudioSession.routeChangeNotification, object: nil) notificationCenter.addObserver(self, selector: #selector(playerDidFinishPlaying), name: .AVPlayerItemDidPlayToEndTime, object: nil)

    notificationCenter.addObserver(self, selector: #selector(playerDidRecieveError(_:)), name: .AVPlayerItemNewErrorLogEntry, object: nil)

     notificationCenter.addObserver(self, selector: #selector(playerDidRecieveError(_:)), name: .AVPlayerItemFailedToPlayToEndTime , object: nil)

    notificationCenter.addObserver(self, selector: #selector(playerDidRecieveError(_:)), name: .AVPlayerItemPlaybackStalled , object: nil)`

}

I added 3 more notifications for interruption handling, but seems not to be working please help with this issue @analogcode @fethica

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions