Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
Posts: 14
Registered: ‎02-14-2011
My Device: Not Specified

Embed tags dont work in webworks?

Can I use embed tags on a webworks htm page?.

I am testing using Playbook simulator.

 

The embed src is from a domain(not local)...but I have white listed that domain in the config file.

Is this the simulator or platform?

 

Thanks in advance

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Embed tags dont work in webworks?

Hi,

 

What are you trying to embed?  If it is audio or video, then it will not currently play in the PlayBook simulator.  This is a known issue, and the reason why is due to missing codecs which prevent this type of media from playing.  Using the <obect> tag on a live device swill be supportd.

 

Cheers,

Adam

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Contributor
Posts: 14
Registered: ‎02-14-2011
My Device: Not Specified

Re: Embed tags dont work in webworks?

I sent you the link of the swf in private to keep identity of my project private.

it is of the form "www.domain.com/abc.swf"

 

it is not a video or audio

Thanks

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Embed tags dont work in webworks?

I also believe the <embed> tag has been depricated from the HTML spec.  You should likely use the <object> tag instead.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Contributor
Posts: 14
Registered: ‎02-14-2011
My Device: Not Specified

Re: Embed tags dont work in webworks?

[ Edited ]

Yes I have used both as below.

 

 

<object width="100%" height="100%" id="m1">

<param name="movie" value="http://www.domain.com/abc.swf"/>

<param name="allowScriptAccess" value="always"/>

<param name="allowDomain" value="*"/>

<embed allowDomain="*" name="m1" src="http://www.domain.com/abc.swf" width="100%" height="100% play="false"  allowScriptAccess="always"></embed>

</object>

 

Actually I am fine with it not working in the simulator...if someone could confirm on a device.

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Embed tags dont work in webworks?

Embedded flash indeed works 100% on the device Smiley Happy

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Contributor
Posts: 14
Registered: ‎02-14-2011
My Device: Not Specified

Re: Embed tags dont work in webworks?

Now my next question may be a little weird...but since i cant see the swf on the simulator here goes

Flash has some api exposed for JS which only works for same domain.

Something like

movie.Play();

movie.GotoFrame(3);

movie.Zoom()

etc etc

 

If the swf file is on the internet (I have rights to use it Smiley Happy )

would these throw that "cross-domain error" that you would see in a browser when the page has a different domain than the swf?

 

Thanks a million for your help...

 

 

Contributor
Posts: 14
Registered: ‎02-14-2011
My Device: Not Specified

Re: Embed tags dont work in webworks?

I got the flash to work using swfobject (js)....and loads on defer in the simulator.

I can use exposed stuf like

movie.Zoom() as it is not domain restricted.

...but i cannot use movie.Gotoframe() as it only works on same domain.

Thanks

Developer
Posts: 46
Registered: ‎02-16-2011
My Device: 8300>9000>9700>9900>Z10
My Carrier: Vodafone

Re: Embed tags dont work in webworks?

Could you please detail what markup / script you used to get the flash file working in the simulator?

 

I have tried using swfobject as follows:

 

Include in the head:

<script type="text/javascript" src="swfobject.js"></script>

<script type="text/javascript">

swfobject.embedSWF("http://192.168.205.102/player_mp3_mini.swf", "flash", "200", "20", "9.0.0");

</script>

 

In the body:

<div id="flash"><p>Flash file goes here</p></div>

 

 

It does not show the "Flash file goes here" text, so i'm confident swfobject is kicking in, but doesnt show the flash. There is a small placeholder that is noticable against the background that is the right 200x20px, but nothing loads in it.

 

I have also tried using for the flash file location

"local:///player_mp3_mini.swf" (when including the swf in the root of the webworks app)

and "player_mp3_mini.swf"

 

Any advice would be great!

 

 

Contributor
Posts: 14
Registered: ‎02-14-2011
My Device: Not Specified

Re: Embed tags dont work in webworks?

I am using the jquery version from here

http://jquery.thewikies.com/swfobject/examples

 

see your bar package size..... & compare your zip package size

Thanks