Desperately seeking help with Shadowbox/JW Player/RTMP

9 messages Options
Embed this post
Permalink
dbzeroone

Desperately seeking help with Shadowbox/JW Player/RTMP

Reply Threaded More More options
Print post
Permalink
Here's the situation...

I built a site that included Shadowbox/JW Player to play a single Flash video. When I passed the site off to my client, they decided to run the video from their Flash Streaming Server on a subdomain.

The problem is that they can't figure how to get the video to load up in Shadowbox/JW Player. The semi-opaque overlay and FLV player both load up, but after a second, the player shows the error:
'Video Not Found' rtmp://subdomain.domain.com/etc...'

I understand that some flashvars need to be entered somewhere, but I'm very confused as to where. This must be a Shadowbox issue, right? JW Player is only playing the flv that loads through Shadowbox, right?

Has ANYONE encountered this problem with a similar setup? I'm going crazy trying to figure out what to do! I'll gladly paypal a donation to the person with the right answer!!

dbzeroone

Re: Desperately seeking help with Shadowbox/JW Player/RTMP

Reply Threaded More More options
Print post
Permalink
Ok, the problem definitely lies with Shadowbox. I can run JW Player by itself on a page and it hooks up to the RTMP server and plays the FLV video perfectly. When I run it with Shadowbox, it throws the error (see above).

So how do I get Shadowbox to recognize an RTMP server and see the file on it? I've tried adding to the flashVars every way imagineable, but I'm coming up with zero luck.

Suggestions? Anyone?
mjijackson

Re: Desperately seeking help with Shadowbox/JW Player/RTMP

Reply Threaded More More options
Print post
Permalink
<musing>Why does nobody ever post any code?</musing>

It would help if you could show us what you're using to embed the JW player with the video, and what code you're currently using to call Shadowbox. I don't have any experience with RTMP, but if I had to guess I'd say you're probably passing a Flashvar to the JW player that you're not passing to Shadowbox as well.
dbzeroone

Re: Desperately seeking help with Shadowbox/JW Player/RTMP

Reply Threaded More More options
Print post
Permalink
My apologies. I've pasted what I believe is the relevant code below:

First, in the <head>
<link rel="stylesheet" type="text/css" href="css/shadowbox.css">
<script type="text/javascript" src="shadowbox.js"></script>

<script type="text/javascript">
Shadowbox.init({
    language:   "en",
    players:    ["flv"]
});

</script>


Then the actual link to the video:

<a href="rtmp://flash.clients-private-server.com/short.flv" rel="shadowbox;height=360;width=640">


I'm not exactly sure what else is required... ask and you shall receive!
All the changes I made to the js files were un-done when they didn't yield results.
mjijackson

Re: Desperately seeking help with Shadowbox/JW Player/RTMP

Reply Threaded More More options
Print post
Permalink
When you embed the video directly in the page (bypassing Shadowbox) what does your HTML code look like? Or, if you're using SWFObject to embed the video, what does your SWFObject code look like? I'm trying to compare the difference between the markup that works and the markup that Shadowbox would generate under the conditions you're using.
dbzeroone

Re: Desperately seeking help with Shadowbox/JW Player/RTMP

Reply Threaded More More options
Print post
Permalink
This is the code that I used when embedding the video with JW Player. I haven't tried it with swfobject.js alone.
(This forum wouldn't allow me to post with 'data=' in the object tag, so I changed it to 'd@ta' for the purpose of posting.)


<script type="text/javascript" src="swfobject.js"></script>
	<script type="text/javascript">
		swfobject.registerObject("player","9.0.98","expressInstall.swf");
	</script>

	<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="328" height="200">
		<param name="allowfullscreen" value="true" />
		<param name="allowscriptaccess" value="always" />
		<param name="flashvars" value="streamer=rtmp://flash.[Clients-Private-Server].com/TYP/&file=short.flv" />
		<object type="application/x-shockwave-flash" d@ta="player-licensed-viral.swf" width="328" height="200">
			<param name="movie" value="player-licensed-viral.swf" />
			<param name="allowfullscreen" value="true" />

			<param name="allowscriptaccess" value="always" />
			<param name="flashvars" value="streamer=rtmp://flash.[Clients-Private-Server].com/TYP/&file=short.flv" />
			<p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to see this player.</p>
		</object>
	</object>
mjijackson

Re: Desperately seeking help with Shadowbox/JW Player/RTMP

Reply Threaded More More options
Print post
Permalink

Hmm...from the looks of it, you'll need to add the "streamer" flashVar when calling Shadowbox. Try playing around with this (in the <head> of the document):

<link rel="stylesheet" type="text/css" href="shadowbox.css">
<script type="text/javascript" src="shadowbox.js"></script>
<script type="text/javascript">
Shadowbox.init({
    language:   "en",
    players:    ["flv"]
});

function openStreamingVideo(){
    Shadowbox.open({
        height: 360,
        width: 640,
        flashVars: {streamer: "rtmp://flash.[Clients-Private-Server].com/TYP/&file=short.flv"}
    });
}
</script>

Then you could call the openStreamingVideo function with something like this:

<a onclick="openStreamingVideo();">click here</a>

It may not be exactly right, but it should at least pass the flashVar correctly.

dbzeroone

Re: Desperately seeking help with Shadowbox/JW Player/RTMP-SOLVED!!

Reply Threaded More More options
Print post
Permalink
I tinkered around with your suggestion from the last post and had no luck, but the theory got me thinking that I should try to include those flashVars in the shadowbox-flv.js again. This time I used the syntax from your previous post and BABLAM! IT WORKED!!

(My BBEdit calls the entire shadowbox-flv.js file line 1, so I can't really give a line number...)

controlbar:(b.options.showMovieControls?"bottom":"none"),backcolor:"0x000000",frontcolor:"0xCCCCCC",lightcolor:"0x557722"}


Appended to:
controlbar:(b.options.showMovieControls?"bottom":"none"),streamer:"rtmp://flash.[clients-private.server].com/TYP",file:"short.flv",backcolor:"0x000000",frontcolor:"0xCCCCCC",lightcolor:"0x557722"}


THANKS A MILLION FOR YOUR HELP MJIJACKSON!!
hothousegraphix

Re: Desperately seeking help with Shadowbox/JW Player/RTMP-SOLVED!!

Reply Threaded More More options
Print post
Permalink
Wondering if someone might be able to provide some guidance as to what the proper syntax would be to pass multiple parameters in addition to flashvars using both the per-link method and the .setup function.

My goal is to reskin the JWPlayer which is possible and I have achieved outside of SB. My swfObject JS looks like:
<script type="text/javascript">
  var s1 = new SWFObject("/scripts/shadowbox-build-3.0b/libraries/mediaplayer/player.swf","ply","580","326","9","#F3F3F3");
  s1.addParam("allowfullscreen","true");
  s1.addParam("allownetworking","all");
  s1.addParam("allowscriptaccess","always");
  s1.addParam("wmode", "opaque");
  s1.addParam("flashvars","file=/videos/my.flv&skin=/scripts/shadowbox-build-3.0b/libraries/mediaplayer/overlay.swf&frontcolor=ffffff&lightcolor=F15922&controlbar=over&stretching=fill");
  s1.write("container");
</script>

Can this even be done? If so, how?

Thank you.