How to stop widget browser after youtube movie
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
How to stop widget browser after youtube movie
Hi,
i was wondering how to stop the widget"browser" from loading a page after playing a youtube movie.
Youtube always shows a bunch of suggestions after a movie/clip ends.
How can you detect this and make the browser invisible? (the last part i know)
So i have a fixed list of which the user can choose from, but i don't want the browser acting as a browser ones the movie is finished.
So i have the chosen url in a variable and then:
set the URL of widget"clipinbrows" to tClipUrl
this works great on mobile, now how do i detect the end of the clip/movie?
thanks for any help.
i was wondering how to stop the widget"browser" from loading a page after playing a youtube movie.
Youtube always shows a bunch of suggestions after a movie/clip ends.
How can you detect this and make the browser invisible? (the last part i know)
So i have a fixed list of which the user can choose from, but i don't want the browser acting as a browser ones the movie is finished.
So i have the chosen url in a variable and then:
set the URL of widget"clipinbrows" to tClipUrl
this works great on mobile, now how do i detect the end of the clip/movie?
thanks for any help.
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: How to stop widget browser after youtube movie
There are javascript solutions to do that, see for example
https://stackoverflow.com/questions/214 ... ne-playing
So you could use one of these and use a javascriptHandler to get informed.
https://stackoverflow.com/questions/214 ... ne-playing
So you could use one of these and use a javascriptHandler to get informed.
shiftLock happens
Re: How to stop widget browser after youtube movie
Thanks, i will have to do some learning on how to do that.
So this ' browserDocumentLoadComplete pUrl ' which you can use in the widgets script would not be appropriate for this?
So this ' browserDocumentLoadComplete pUrl ' which you can use in the widgets script would not be appropriate for this?
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: How to stop widget browser after youtube movie
No, usually loading should be a bit in advance of playing ("buffer"), also you can load without playing.
You could start with how to pause/start/stop an audio in the browser, in your case the widget, from LiveCode. Then go step by step to your scenario, finally using an event listener (see the stackoverflow answer linked to above).
Here is a starting point, a tutorial for a HTML5 standalone.
It is the same for a browser widget. And it is the same for a <video> element as for an <audio> element.
Instead of do tScript as "JavaScript"
you write do tScript in widget "Browser"
The HTML file in the tutorial is the htmltext of your browser widget.
http://lessons.livecode.com/m/4071/l/74 ... s-in-html5
You could start with how to pause/start/stop an audio in the browser, in your case the widget, from LiveCode. Then go step by step to your scenario, finally using an event listener (see the stackoverflow answer linked to above).
Here is a starting point, a tutorial for a HTML5 standalone.
It is the same for a browser widget. And it is the same for a <video> element as for an <audio> element.
Instead of do tScript as "JavaScript"
you write do tScript in widget "Browser"
The HTML file in the tutorial is the htmltext of your browser widget.
http://lessons.livecode.com/m/4071/l/74 ... s-in-html5
shiftLock happens
Re: How to stop widget browser after youtube movie
Thanks a lot!
I was thinking where do i put this script? but i can just put in a field or file and then put it in a variable.
Then use the command as you described.
I will do some testing and report back.
I was thinking where do i put this script? but i can just put in a field or file and then put it in a variable.
Then use the command as you described.
I will do some testing and report back.
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: How to stop widget browser after youtube movie
Don't forget that tScript (the javascript) has to be ONE line only, separate commands by "; " instead of CR.
shiftLock happens
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: How to stop widget browser after youtube movie
You might try this, which doesn't require javascript:
https://stackoverflow.com/questions/363 ... embed-code
https://stackoverflow.com/questions/363 ... embed-code
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: How to stop widget browser after youtube movie
Thanks, that will be a long line of script then
Thanks for the link Jaqcue,
Other parameters https://developers.google.com/youtube/player_parameters i
after all it is ?rel=0 behind the embed url
(in joomla too extra parameters is first with ? sign )
Great ! works now. No related videos, just the same which was playing, you can loop it too &loop=1 behind it.
So you get like:
https://www.youtube.com/embed/aOyYhccJHVw?rel=0&loop=1
Thanks for the link Jaqcue,
Other parameters https://developers.google.com/youtube/player_parameters i
after all it is ?rel=0 behind the embed url
(in joomla too extra parameters is first with ? sign )
Great ! works now. No related videos, just the same which was playing, you can loop it too &loop=1 behind it.
So you get like:
https://www.youtube.com/embed/aOyYhccJHVw?rel=0&loop=1
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: How to stop widget browser after youtube movie
This solution has nothing to do with LiveCode, is simple HTML only.
Your original question was how to make the widget stop after playing a movie?!
So, good for you, but wasted time for me. I better stop answering such questions ...
Your original question was how to make the widget stop after playing a movie?!
So, good for you, but wasted time for me. I better stop answering such questions ...
shiftLock happens
Re: How to stop widget browser after youtube movie
Yes the question is correct, but it don't matter how it is solved.
Any solution will do, and the easy ones(or the ones who work the best) are the best.
I do appologize if it was different for you, I really do appreciate your help and from others too a lot !
And if i can help others with solutions i will do so too.
I did in my question not expect that it could be solved that way, but that the browser itself had to detect it somehow.
Schone feierabend noch!
Any solution will do, and the easy ones(or the ones who work the best) are the best.
I do appologize if it was different for you, I really do appreciate your help and from others too a lot !
And if i can help others with solutions i will do so too.
I did in my question not expect that it could be solved that way, but that the browser itself had to detect it somehow.
Schone feierabend noch!
Re: How to stop widget browser after youtube movie
Probably Hermann's suggestions are going to be of big help
http://forums.livecode.com/viewtopic.php?f=53&t=30575
After all he is the Master of the Browser Widget
Difficult for me but let's try.
http://forums.livecode.com/viewtopic.php?f=53&t=30575
After all he is the Master of the Browser Widget
Difficult for me but let's try.