Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Browser widget has unexpected behavior using videos (YouTube)(Especially in Safari the video is shown no matter what happens.)
Browser widget has unexpected behavior using videos (YouTube) [message #1211700] Tue, 26 November 2013 10:25 Go to next message
Rainer A. is currently offline Rainer A.
Messages: 2
Registered: November 2013
Junior Member
Hi all,
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):

http: //rap.eclipsesource.com/controlsdemo/controls#Browser

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):

<html>
<head>
</script>
</head>
<body>
  <iframe width="420" height="315" src="//www.youtube.com/embed/9sVEIyq04rg?rel=0" frameborder="0" allowfullscreen></iframe>
</body>
</html>


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?

Thanks,
Rainer

[Updated on: Wed, 27 November 2013 01:45]

Report message to a moderator

Re: Browser widget has unexpected behavior using videos (YouTube) [message #1213538 is a reply to message #1211700] Wed, 27 November 2013 04:28 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim Buschtoens
Messages: 379
Registered: July 2009
Senior Member
Hi.

> Now my Question:
> Has anyone a workaround for this? Is this worth a bug in the RAP
> Bugzilla? Can anyone help me?

I can't help you with the issues itself, but regarding a bugzilla
report: Right now this doesn't look like a bug in RAP, but a general
browser problem. If you find a solution that is generic enough that it
can be built into RAP without drastic changes, you should open an
bugzilla request.

Greetings,
Tim

--
Tim Buschtöns

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Browser widget has unexpected behavior using videos (YouTube) [message #1213584 is a reply to message #1213538] Wed, 27 November 2013 04:53 Go to previous messageGo to next message
Rainer A. is currently offline Rainer A.
Messages: 2
Registered: November 2013
Junior Member
Hi Tim,
thanks for your fast answer. Even if it is not what i expected to hear Sad

Do you have any suggestions about where (forum about SWT?) and how (keywords) i could find more infos?

Regards
Rainer
Re: Browser widget has unexpected behavior using videos (YouTube) [message #1213639 is a reply to message #1213584] Wed, 27 November 2013 05:22 Go to previous message
Tim Buschtoens is currently offline Tim Buschtoens
Messages: 379
Registered: July 2009
Senior Member
Hi.

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
misbehaves when you remove/hide it by JavaScript. So probably not a bug
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
youtube + iframe + javascript instead of RAP + browser widget + youtube.

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.


Greetings,
Tim

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?
>
> Regards
> Rainer

--
Tim Buschtöns

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:RWT in IFRAME
Next Topic:rowTemplate Right tracking and refresh
Goto Forum:
  


Current Time: Tue Jul 29 11:06:39 EDT 2014

Powered by FUDForum. Page generated in 0.02687 seconds