Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Player Menu and only show Iframe menu #1105

Open
lluzalves opened this issue Jan 25, 2024 · 4 comments
Open

Remove Player Menu and only show Iframe menu #1105

lluzalves opened this issue Jan 25, 2024 · 4 comments
Labels

Comments

@lluzalves
Copy link

lluzalves commented Jan 25, 2024

Question

Summary

Hello, I tried to remove the native player control, so it can only show the Iframe control.
But the native menu container seems to always overlay the iframe menu player.

        val iFramePlayerOptions = IFramePlayerOptions
            .Builder()
            .ccLoadPolicy(1)
            .ivLoadPolicy(3)
            .controls(1)
            .build()
  view.youtube_player_view.getPlayerUiController().showMenuButton(false)
       view.youtube_player_view.getPlayerUiController().apply {
            showMenuButton(false)
            showBufferingProgress(false)
            showDuration(false)
            showPlayPauseButton(false)
            showSeekBar(false)
        }
        view.youtube_player_view.initialize(object : AbstractYouTubePlayerListener() {
            override fun onReady(youTubePlayer: YouTubePlayer) {
                youTubePlayer.loadVideo("some_id", 0f)
            }
        }, true, iFramePlayerOptions)

If I set showUi(false)

  view.youtube_player_view.getPlayerUiController().showMenuButton(false)
       view.youtube_player_view.getPlayerUiController().apply {
            showUi(false)
        }

I can see the iframe menu/control at the start but after a second it is gone and whenever I click on the video it does not show again.

@PierfrancescoSoffritti
Copy link
Owner

Hi, which version of the library are you using?

@lluzalves
Copy link
Author

Hi @PierfrancescoSoffritti , currently using this 10.0.5

@PierfrancescoSoffritti
Copy link
Owner

Please consider updating to the latest version :) web ui si the default there, an that's the recommended way to use the library.

@lluzalves
Copy link
Author

Thanks @PierfrancescoSoffritti , will check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants