Problem with Flash object in SWT Browser [message #981668] |
Mon, 12 November 2012 10:53 |
Eclipse User |
|
|
|
Hi there,
today i tried to implement a Youtube Video in my Java application by using the swt.browser.
That woked great with simple Videos.
Then i decided to use the Youtube Player API to design a own player that looks better in my application.
And there comes the problem:
After a few hours bugfinding, i figured out, that the SWT Browser can't display Flash contents in a <object> tag.
As long as the content is just in a <embed> tag, it works great but i can't talk to the player via JavaScript as long as it's not in a <object> tag and i need this to create my own Youtube Player.
Is there any way to make the <object> work or is it possible to talk via JavaScript to a <embed> Flash object and i'm just to stupid to do that ?
Here is my Object:
<object id="ytplayer" width="100%" height="100%" style="visibility: visible;" data="[link to youtube]/apiplayer?enablejsapi=1&playerapiid=ytplayer" type="application/x-shockwave-flash">
<param value="always" name="allowScriptAccess">
</object>
And here is the embed, that works:
<embed id="ytplayer" width="100%" height="100%" name="plugin" src="[link to youtube]/apiplayer?enablejsapi=1&playerapiid=ytplayer" type="application/x-shockwave-flash">
|
|
|
Powered by
FUDForum. Page generated in 0.19786 seconds