I want to have a WebButton on a WebPage that pauses the playback of a Youtube video loaded in a WebHTMLViewer. I don’t want to use the Youtube controls to control playback.
The Youtube video is loaded using the WebhHTMLViewer LoadPage method (where vid is the youtube id):
When I run it, the Youtube video plays, but when the button is pressed I get an error message indicating the object with id ‘yt’ is null. Here’s the line in the WebButton Action event:
A WebHTMLViewer control creates an iframe on your page, so your iframe is inside of that one. You’ll need to chain down through the WebHTMLViewer’s iframe by using it’s ControlID. Or better yet, don’t create your own iframe, just assign the URL of the WebHTMLViewer to the youtube url.
Are you still offering your YouTube API examples and resources?
I am trying to build a new web site on Xojo Clou, to play YouTube clips, with the clip code launched from my web app, but for the stream to go straight to YouTube so it does not use anything from the allotted 2 TB (or 4 TB) limit of transfer data/month (per Xojo Cloud).
The main things I need to get in my Xojo Web App are (a) to know if the clip is running (at all), and (b) how many seconds it has played. The least JavaScript codes to use the better.