jwplayer in floatbox

Page: 1

Author Post
Member
Registered: Sep 2012
Posts: 1
Hi,

i've been trying for quite a while now to play a mp4-video with our Jwplayer in a Floatbox, but this doesn't work.

While Thickbox 3 (http://www.codylindley.com) works quit well with this syntax:

    <div class="teaser_image_zoom"><a href="#TB_inline?width=485&height=275&inlineId=video2" class="zoom thickbox" title="Title">Play</a></div>
<div id="video2" style="display:none">
<embed src="/data/scripts/player.swf" width="480" height="270" allowscriptaccess="always" allowfullscreen="true" flashvars="autostart=true&width=480&height=270&file=http://myVideoServer/video.mp4&streamer=lighttpd" />
</div>
</div>


Floatbox does not work with the embed-tag.

Any ideas to use Jwplayer?

Thanks,

Chris
Administrator
Registered: Aug 2008
Posts: 3382
Nobody wants to show me live pages exhibiting their problems today. :( I'm left with statements that pretty much boil down to "hey, I've got something not working somewhere. What's wrong?"

I took your hidden div with the embed in it, changed it to point to an swf file that exists on my server, and it loaded up just fine in Floatbox. There's no way I can know why you might be having trouble on your server.

But that's not a great way to show swf content anyway. You would be better off using Floatbox's ability to direct-load swf content.

Try something like:
<a href="/data/scripts/player.swf?file=//myVideoServer/video.mp4&amp;streamer=lighttpd" class="floatbox" data-fb-options="width:480 height:270">Play</a>
(no hidden div needed)

To really do it up right and flexibly, you could build a small smart iframe page which does nothing but show the flash content correctly and then load that iframe page as type:video. There's an example complete with source of the small video page on the Multimedia tab of the demo page. That one uses flowplayer but could be easily adapted to use jwplayer instead.

Page: 1