I'm making an app that uses the YouTube API to play YouTube videos. When I go into full screen mode, I switch the player style to CHROMELESS because I want to create my own set of media controls.
I have developed a set of gestures that map to changing volume, brightness, and seeking. When these changes occur, a progress bar pops up over the video showing the user their changes in real time. I have placed all my Views in a single FrameLayout in order to get the progress bars to show up on screen when the player is fullscreen.
The problem is that (before I added volume control functionality) the video would automatically pause as soon as I entered fullscreen mode. I am handling orientation and screenSize changes myself. I noticed that it would pause roughly 2 seconds after my personally made seekbar would pop up.
So for testing, I altered my code by NOT changing the player style to CHROMELESS, that is, I left it as DEFAULT. I removed my seekbar as well and now the video worked fine; I could change brightness and play the video with no problem. During another test, I removed all instances of youtubePlayer.pause() from my code, left the seekbar in, and changed back to CHROMELESS. But the problem returned--so it must be something to do with the seekbar.
Now, however, I have added volume control functionality and when I run it (even when I'm not fullscreen) the player pauses almost immediately after I press play and it doesn't work at all afterwards.
Can anyone help me out? I'll add some of my code when I get back to my computer. I really appreciate your help.