YoutubeKit
YoutubeKit copied to clipboard
Dismiss using the X button
Hello,
I can't dismiss the player when clicking on "x" button on the top left of the screen. The problem happens even when I add the player into a subview, or replace self.view. Please check this issue.
Any update on this because when I try to add the player in subview i get "Bad Request" error.. everytime, no matter which videoId i give it
error = { code = 400; errors = ( { domain = usageLimits; message = "Bad Request"; reason = keyInvalid; } ); message = "Bad Request"; };
I can't dismiss the player when clicking on "x" button on the top left of the screen.
This issue might be due to the player's view not being properly positioned or there being an issue with the view hierarchy. Please try the following steps:
-
If you're adding the player as a subview, make sure the frame of the player is set to fit within the bounds of the subview.
-
If you're replacing self.view with the player's view, ensure that the player's view becomes the root view of the view controller.
-
Make sure the player's view is not being obscured by other views. This includes cases where other views are on top of the player's view or the player's view is at the bottom of the view hierarchy.
-
Ensure the player's view is properly added to the view controller's view hierarchy. This includes the player's view being added to the root view of the view controller or the player's view being added as a subview of the view controller's view.
If these steps do not resolve the issue, please provide more detailed information along with a minimal code sample that reproduces the problem.
domain = usageLimits; message = "Bad Request"
This issue may occur if you have reached the usage limit of the YouTube Data API, or if the API Key set is not correct. Please check if your API key is correct and verify on the Console if you have not reached the quota limit of the YouTube Data API.