Operation requires a client data source to have been registered.

When my tvOS app tries to play a video in an AVPlayer using the tvOS simulator in XCode, I get the following error:


[MediaRemote] [MRPlaybackQueueServiceClient] playbackQueueRequest AFCF4995-D293-4B5B-82F0-E701186F639F PineBoard-21384 /A600.000000x600.000000/R[0:1] responded to asset request with error Error Domain=kMRMediaRemoteFrameworkErrorDomain Code=15 "Operation requires a client data source to have been registered." UserInfo={NSLocalizedDescription=Operation requires a client data source to have been registered.}


I've searched in Google, but the "Operation requires a client data source to have been registered" message doesn't appear on any site.


Anyone have a clue?


Thx in advance.

Replies

Hi, do you have any clue on this yet?

I do have the same issue on a device - playing local video files.

The video is played properly, but I still get the same error.
Searching on the web does really not show up much - seems to be pretty seldom…

Adding the following to appDelegate.swift appears to fix the error:


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

// Override point for customization after application launch.

let audioSession = AVAudioSession.sharedInstance()

do {

try audioSession.setCategory(.playback, mode: .moviePlayback)

}

catch {

print("Setting category to AVAudioSessionCategoryPlayback failed.")

}

return true

}

  • I'm also facing same error, i don't have appDelegate.swift file in my app. Where should i add above code?

    thanks in advance.

Add a Comment

I am seeing the same warning. Does not appear to affect my app so I am regarding it as an Xcode / tvOS bug. (Setting the Category to moviePlayback had no effect, either, btw.)