|Browser widget has unexpected behavior using videos (YouTube) [message #1211700]
||Tue, 26 November 2013 15:25
| Rainer A.
Registered: November 2013
I'm building a wizard that should show videos to give the user additional information. The video should be hosted on YouTube. I embedded the video with a browser widget.
On Firefox (25.x) everything works fine. When I go to the next page the video stops and the new page is shown as expected.
But if I use the wizard in IE (10.x) it already begins to change. The new page is still shown as expected but the video of the old page still is running and you can hear it. This is a little bit disturbing and may confuse the user a little bit.
On Safari (5.x Windows) the new page still shows the running video of the old page. If the new page also has a video both are shown and if I start it both videos are running. In this way you can go from page to page and end up in a real mess. This behaviour ruins my wizard completely.
To reproduce it in a fast and easy way go to the browser widget in the RAP Controls Demo (Unfortunately I can't provide you a link to it directly because this is my first post in this forum. Copy the text below and delete the white space):
Paste some code for embedding a YouTube video into the HTML text control. For Example (video "Learn about RAP in a minute" from the user Rich Ajax Platform):
<iframe width="420" height="315" src="//www.youtube.com/embed/9sVEIyq04rg?rel=0" frameborder="0" allowfullscreen></iframe>
Click Go. The video is shown. Now start the video. Everything OK. But now uncheck the "Visible" check box. Now the behaviour differs:
- Firefox: the video is not shown anymore and you hear nothing. If you check it again the video is shown like the first time (at beginning and not running).
- IE: the video is not shown anymore but you still can hear it. If you check it again the video is shown and still running.
- Safari: the video is still shown and running. It simply don't matter if you check the check box or not. To demonstrate how far this goes you can click the button "Dispose the Java Function" (without clicking "Create the Java Function" before!). You get a HTTP Status 500 page with a stack trace. But the video is still on top and running.
Now my Question:
Has anyone an idea or a workaround for this? Is this worth a bug in the RAP Bugzilla? Can anyone help me?
[Updated on: Wed, 27 November 2013 06:45]
Report message to a moderator
|Re: Browser widget has unexpected behavior using videos (YouTube) [message #1213639 is a reply to message #1213584]
||Wed, 27 November 2013 10:22
| Tim Buschtoens
Registered: July 2009
I don't think SWT is the right place to look for a solution. This is an
issue with youtube and iframes. All that RAP does when a browser widget
is created is to create an iframe and add it to the DOM. When the
browser widget is destroyed, the iframe is removed from the DOM again.
In case the browser widget is only set to visible=false, the "display"
style property of the iframe is set to "none".
So basically, your problem is that an iframe with a youtube video
in RAP, but a bug in flash (assuming the youtube video uses flash)
and/or the browser. Perhaps you manage to find a solution if you search
If there is a fix/workaround that is universal (i.e. not depending on
youtube specifically), we may be able to include it in RAP. I could
imagine that it could also help if you set another html page on the
browser widget before destroying it or use browser.execute to
stop/dispose the youtube video with JS, but this is where I can't help
since this is youtube related.
Am 27.11.2013 10:53, schrieb Rainer A.:
> Hi Tim,
> thanks for your fast answer. Even if it is not what i expected to hear :(
> Do you have any suggestions about where (forum about SWT?) and how
> (keywords) i could find more infos?
Professional services for RAP and RCP?
Powered by FUDForum
. Page generated in 0.03245 seconds