rinov/YoutubeKit

.showControls(.hidden)

maciaspeter opened this issue · 1 comments

The .showControls(.hidden) doesn't hide the controls.

To reproduce the issue, download the example and replace the initialization of the player with the code below -

// Create a new player
        player = YTSwiftyPlayer(
            frame: CGRect(x: 0, y: 0, width: 640, height: 480),
            playerVars: [
                .playsInline(false),
                .videoID("_6u6UrtXUEI"),
                .loopVideo(true),
                .showRelatedVideo(false),
                .showControls(.hidden)
                
            ])
rinov commented

Some features of that API may behave differently depending on the browser environment and device type. In particular, settings that affect the appearance of the player, such as .showControls(.hidden), may not work as expected on some browsers or devices.

To resolve this issue, you could consider the following approaches:

  1. Review the player's settings: Not just .showControls(.hidden), but also review other player settings. For example, setting .playsInline(true) may cause the controls to disappear in some environments.

  2. Use CSS: YoutubeKit internally uses a WebView to display YouTube videos. Therefore, by customizing the CSS of the WebView, you can finely adjust the appearance of the player. However, this requires a developer who is familiar with web technologies.

Please try these approaches. If the problem still persists, please share more detailed information and reopen this issue again.
Thank you.