Issue playing embedded video in an iOS application

Greetings, i have a problem with embedded youTube videos. It worked fine sometime ago, and works fine on Android. But i started getting user feedback, telling me something was wrong, so i did some tests…

When a video is muted the video plays fine, but if it is not muted, it will stop, and throw an error. So if i add &mute=1 to my embeded youTube url, the video plays. But when mute=1 is not added, it breaks instantly.

I have tested on 2 iPhones and 1 iPad Pro, same issue on all 3 devices, currently running softwareversion 13.3.

This is the error that is thrown and shown in Xcode:

 [assertion] Error acquiring assertion: <NSError: 0x28349c330; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x103e67080; requestedReason: MediaPlayback; reason: MediaPlayback; flags: PreventTaskSuspend | PreventTaskThrottleDown | WantsForegroundResourcePriority>;
    }
}
[ProcessSuspension] 0x1149d0f28 - ProcessAssertion() PID 1358 Unable to acquire assertion for process with PID 1358
[ProcessSuspension] 0x1149d0f28 - ProcessAssertion::processAssertionWasInvalidated()

[assertion] Error acquiring assertion: <NSError: 0x2834aac40; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x105a2fbc0; requestedReason: MediaPlayback; reason: MediaPlayback; flags: PreventTaskSuspend | PreventTaskThrottleDown | WantsForegroundResourcePriority>;
    }
}

[ProcessSuspension] 0x1149d0f78 - ProcessAssertion() PID 1358 Unable to acquire assertion for process with PID 1359
[ProcessSuspension] 0x1149d0f78 - ProcessAssertion::processAssertionWasInvalidated()

I have tried enablind/disabling all sorts of permissions. I tried looking through CDVWKWebViewEngine.m since i suspect there are some errors there. But in the end, it might be some simple permission i need to enable… or even some iOS related setting the user needs to enable/disable.

I really hope someone else have a solution to this problem, since it frustrates me a great deal. If not a solution, at least some ideas… thanks!

Im still hoping for some help… no one? So everyone with an iOS app plays video just fine with iOS 13+??

https://developers.google.com/youtube/player_parameters

I don’t know exact solution but please look deep inside the doc If there is missing arguments.

Thank you for your reply. I have indeed looked through the docs, and changed some parameters, but besides going from fullscreen to inline play, there isn’t much that seems iOS related.

I still suspect it is an issue with iOS 13+, since it used to work just fine previously.

I will do some more tests on a completely clean project today.

I figured out my issue, it was with the plugin cordova-plugin-background-mode.
I fixed the iOS issues and are using a fork of said plugin now.

So, if anyone have issues with music player sound stopping on iOS when you are opening your app, or have issues with unmuted embedded videos not playing correctly, you might also have issues with the cordova-plugin-background-mode plugin.