Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Can the player follow a redirect to an FLV file?

15 replies [Last post]

We're using SWFObject to create the player on the screen, and then pass a URL to the FLV file with addVariable("file", url). This works well for our videos but for advertising, we need to book the video into our ad server, which returns a URL that is a 302 Redirect to the commercial. This is so the impression of the video can be tracked by our 3rd party ad system.

So far, it isn't following the URL. If I give it the real URL to the file, it plays just fine. Your thoughts?

We use redirects all the time for the various video sites. See this thread for examples: [url=http://www.jeroenwijering.com/?thread=5484#msg56933]TRYING TO STREAM YOUTUBE VIDEOS[/url]

It looks like you're using a proxy to retrieve the video. I would like to avoid having to do that if I can.

Those scripts aren't proxies. Their only purpose is to create the redirect URL. Then, the video flows directly from the source, not through the script (which would make it a proxy). They could even be a server-issued redirect, if the server knew the redirect URL. The point was to show you that the player can use a redirect to play a media file without any problem.

Well, this is not what I'm seeing. It's as though the player can't handle the redirect at all. Here's an example of what I'm trying to do:

1. An advertiser gives me a commercial in the form of an FLV file. I store it on my web server and give the actual URL to my advertising staff.

2. Our advertising folks book the ad into their advertising system, which creates an ad space that sets a javascript variable in the web page. When this ad space appears on the video page, it sets a variable that contains a redirect URL to the video. I know it works because I can paste the value of that variable into a browser and it will resolve to the actual file and asks if I want to download it.

3. In the page code, I pass that variable as the "file" parameter to the player and expect it to play. Instead, the player just sits there and never downloads the file. If I set that variable to contain the true URL to the FLV file instead of the redirect, it works every time.

So where am I going wrong? The redirect is important as it's the only way our advertising system can count that the commercial was requested. Our clients require this

Can you give us some actual working examples and the portion of your page code showing the JavaScript variable and the URL that it contains and where you're passing the variable to the player.

Indeed, do you have a demo? With Bits on the Run, we also redirect serverside from an ID to the actual file.

I'm not sure if it is with a 302 header or URL rewriting though. Let me ask. The latter will definetily work.

Hi JeroenW,

As this thread haven't been updated, I feel ashamed to hijack this thread. I do actually encounter the same problem.

I can not post the orginal URL for discretion issues, so I use this tinyURL : http://tinyurl.com/4wqr43

Unfortunately when we try to display the player using the script generated by your wizard we fail miserably. It seems the player cannot translate the link variable into a useful URL. It looks like it tries to load something forever.

<embed
src="http://www.jeroenwijering.com/embed/player.swf"
width="300"
height="250"
allowscriptaccess="always"
allowfullscreen="false"

flashvars="height=250&width=300&file=http://tinyurl.com/4wqr43&image=http://www.jeroenwijering.com/upload/spotajob.jpg&displayheight=250&linkfromdisplay=true&link=http://toussa.net&linktarget=_blank&searchbar=false&showicons=true&usefullscreen=false"
/>

We use your default Jpeg for the test.

Help me JeroenWan Kenobi, you are our only hope.

Regards

@Gnok - you need to set the type flashvar!

from the "Supported Flashvars" page: http://www.jeroenwijering.com/?item=Supported_Flashvars

type (mp3,flv,rtmp,jpg,png,gif,swf): Only for the mediaplayer, which determines the type of file to play based upon the last three characters of the file flashvar. This doesn't work with database id's or mod_rewrite, so you can set this flashvar to the correct filetype. If not sure, the player assumes a playlist is loaded.

Hello again,

I added the var type=flv and it now works perfectly fine.

Thanks anyway !

Regards.

This is very close to what we want to do with one small twist. We have a URL, such as:

http://test.website.com/?id=abc/123

That redirects to a flash streaming server:

rtmp://one.flash.media.com/account/493921/test.flv

We do this by a php script that reads the id and then checks a database to see what URL to redirect to.

I tried putting the whole URL into the "file" flashvar and setting the type to rtmp, but the player errors out.

Any idea how I can get the player to follow the redirect and recognize that it's a streaming server?

Thank you

How can we achieve this via Longtail JW player / media playear...?

We would like to pass an flv video link via email that would start playing on a web page straightaway.

For eg: www.xyz.com/test.flv

The flv video filename needs to be dynamically passed (as shown in the above link) and subsequently played on the web site.

How can we do this. Any help is much appreciated.

Thanksl
Sujit.

Player seems to recognize file format by Url end.
Try to complete your URL with ".ext" (extention of file) when playing, and throw out ".ext" on the server.
http://test.website.com/123 --> http://test.website.com/123.flv

links such a http://test.website.com/?id=123 don't work :(
could anybody help?

Who knew php script which can parse link with redirect and pull out destination link from it into a var ?

Please provide a link?