Reputation: 929
I have embedded a youtube video as shown here. I have several videos and when one finishes the next one starts automatically. I achieved this by looking up the video duration and starting a TimerTask.
Now there is one problem left: If the user pauses the youtube video, the timer continues and the next video starts after some time. I thought of this solution but could not make it happen: Implement a JButton, that stops the timer, changes the focus to the youtube video and presses the space button. That should stop the video. I played with the JWebBrowser.grabFocus() and alike but I was not succesful.
Any help would be appreciated.
Upvotes: 0
Views: 119