MPCPlayerRequestErrorDomain Code=1000 "Failed to send command 0"
Asked Answered
O

0

7
let cloudServiceController = SKCloudServiceController()
let musicPlayer = MPMusicPlayerController.systemMusicPlayer

self.cloudServiceController.requestCapabilities { capabilities, error in
            guard capabilities.contains(.musicCatalogPlayback) else { return }
            self.canMusicCatalogPlayback = true
        }

let tracks = album!.relationships!.tracks!
        let trackIDs = tracks.map { $0.id! }
        let startTrackID = tracks[indexPath.row].id!
        let descriptor = MPMusicPlayerStoreQueueDescriptor(storeIDs: trackIDs)
        descriptor.startItemID = startTrackID
        musicPlayer.setQueue(with: descriptor)
        musicPlayer.play()

I working on MediaPlayer and I got an error as below.

MPMusicPlayerController play] completed error: Error Domain=MPCPlayerRequestErrorDomain Code=1000 "Failed to send command 0" UserInfo={NSDebugDescription=Failed to send command 0, NSUnderlyingError=0x280670f00 {Error Domain=MPCPlayerRequestErrorDomain Code=1000 "Failed to send command 0 (MRSendCommandError = 4)" UserInfo={NSDebugDescription=Failed to send command 0 (MRSendCommandError = 4)}}}

I went through below link but I need to resolve this issue.

https://forums.developer.apple.com/thread/100476

please help me

Olindaolinde answered 14/2, 2019 at 7:16 Comment(1)
Hi @Olindaolinde ,i'm having same issue, some songs are not getting play , did you find out. solution for sameMarlette

© 2022 - 2024 — McMap. All rights reserved.