제어센터

    MPNowPlayingInfoCenter 제어센터 초기세팅 및 갱신하는 방법

    MPNowPlayingInfoCenter 제어센터 초기세팅 및 갱신하는 방법

    뮤직플레이어앱을 개발하면서 제어센터를 사용하기 위해 코드를 짰지만 webview에서 동영상을 재생하는 방식인 우리 앱에선 동작하지 않아 버리기엔 아까워 코드를 공유하고자 남깁니다. // 제어센터 초기세팅 import MediaPlayer func MPNowPlayingInfoCenterSetting() { // 제어 센터 이벤트 수신 시작 // Info.plist에 // UIBackgroundModes : audio 또는 // Required background modes : App plays audio or streams audio/video using AirPlay 해주어야 합니다. UIApplication.shared.beginReceivingRemoteControlEvents() let cente..