You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Forum user: jb123

Basic information

Registered Oct 16, 2009
Last login Nov 27, 2009
Forum posts 31
Direct URL http://www.flowplayer.org/forum/users/17120

Latest forum posts

Posts:

Registered:

» » » Help!!!! please inform what is wrong with following code?

Posted: Nov 23, 2009

I can't recall if I used Flowplayer's BaseUrl and Url properties when I configured the URL for Progressive Download. I think BaseUrl was optional (can't recall).

The key point is that you need to send the full absolute URL to SimpleCDN because it's an external link from your app to them.

But it needs to have the prefix like this:


var videoURL = 'flv:http://e1h13.simplecdn.net/flowplayer/flowplayer.flv'; 

You can also get a CNAME at SimpleCDN which would let you do something like the following. It's described on the Upload Bucket access page where you got the URL for simpleCDN. But using a CNAME is not required...


var videoURL = 'flv:http://cdn.<a virtual domain>/flowplayer.flv'; 

I am new to working with video though I have many years of experience developing web applications of varying complexity.

I first got Progressive Download to work with my hosting company hosting video than switched to using a CDN - simpleCDN.

I then got the Flowplayer RTMP Streaming Plugin to work with SimpleCDN, see:http://flowplayer.org/forum/5/31582 (the final working code sample is at the bottom of that post).

I then tried to get the Flowplayer Secure Streaming plugin to work with the RTMP plugin with Simple CDN and found out that SimpleCDN will not support Secure Streaming for about 3 weeks from now. See:http://flowplayer.org/forum/5/31658.

I think everyone runs into the same difficulty and frustration with the documentation. I certainly did :> Though everyone in this business knows it really is hard to document a rapidly moving development project.

JB

Posts:

Registered:

» Help!!!! please inform what is wrong with following code?

Posted: Nov 23, 2009

dcluser,

You are using simpleCDN http progressive download with never max expires headers


url: 'http://e1h13.simplecdn.net/flowplayer/flowplayer.flv',

For simpleCDN http progressive download you need to append a prefix to the url that corresponds to the file extension.

flv:
or
mp4:
or
mp3:

I use the following:


//Different CDN providers have different syntax rules for how
      //the video URL is passed to them.
     //Sometimes they want the url to contain the file extension
      //and sometimes they don't.
     //simpleCDN requires the file extension AND also a URL prefix 
    //to match the file extension.
     //Examples:
     //    URL = flv:<your upload bucket location>.flv
     //    URL = mp4:<your upload bucket location>.mp4
     //    URL = mp3:<your upload bucket location>.mp3 
        if (videoUrl.match(/.flv/) ) {
         videoUrl = 'flv:<your upload bucket location>' + videoUrl;
     } else if (videoUrl.match(/.mp4/) ) {
         videoUrl = 'mp4:<your upload bucket location>' + videoUrl; 
    } else if (videoUrl.match(/.mp3/) ) { 
        videoUrl = 'mp3:<your upload bucket location>' + videoUrl; 
    } 

and in the clip:


url: videoUrl,

and I assume here that your upload bucket is /flowplayer/ per your code. I suggest you not reveal that in public forums when you post your code...

http://e1h13.simplecdn.net/<<path_to_your_upload_bucket>>/<<path_to_your_file>>

Also, it's preferable if you wrap your code in code tags when posting in the forum so they format.
hth,

-jb

Posts:

Registered:

SimpleCDN does not support Secure Streaming until Wowza 2

Posted: Nov 20, 2009

I heard back from SimpleCDN support.
............................................................................................

From: SimpleCDN Support <support@simplecdn.com>
To: Jerry.....
Sent: Fri, November 20, 2009 1:07:50 PM
Subject: [SUPPORT #OVW-252477]: secure streaming + rtmp + Flowplayer

Hi Jerry,

Thanks for your email. We currently do not support secure streaming via RTMP - this is an optional feature that we'll be supporting in a few weeks with the release of Wowza 2. For now you should just use the basic RTMP streaming setup.

Thanks,

Tony
----------------------------------------------------
SimpleCDN Support
Available 24/7
............................................................................................

Currently, SimpleCDN only supports HTTP Progressive Download and RTMP Streaming. In a few weeks they will release Wowza 2 and then they will support Secure Streaming.

Question:
Flowplayer Developer(s):

Will and when will do you anticipate that you'll be able to post a demo that shows how to configure Flowplayer to simultaneoulsy use RTMP Streaming and Secure Streaming with SimpleCDN?

In additon, it would have been helpful and saved several hours of wasted time if you folks had simply indicated on your site (unless I missed seeing it) that SimpleCDN does not currently support secure streaming and that you are only using RTMP streaming with them.

Thanks,

Jerry

Posts:

Registered:

» » secure streaming plugin not loaded with simpleCDN

Posted: Nov 20, 2009

I found a Flowplayer demo for using the streaming and secure plugins and it states the netConnectionUrl should be

 netConnectionUrl: 'rtmp://flowplayer.org:1935/securestreaming?doConnect=1gt345'

So I commeted out the netConnectionUrl I was previously using and worked to implement rmpt streaming and changed it to:


//netConnectionUrl: 'rtmpt://e1f1.simplecdn.net/play'
netConnectionUrl: 'rtmp://flowplayer.org:1935/securestreaming?doConnect=1gt345'

Now the Flowplayer error is:

unable to load stream.. clip.. connection failed... secure token was not accepted by the server.

Generally speaking, in the last 15 years I don't have significant problem reading software documentation and APIs... there must be something I'm missing here..

Thank you,
-JB

Posts:

Registered:

» secure streaming plugin not loaded with simpleCDN

Posted: Nov 20, 2009

Update:
I tried different syntax and now the Flowplayer error is that the connection is not establed and the secure token was not received from the server.

Flowplayer developers,
You have a great product and you recommend using simpleCDN.
It would be very helpful if you provided a documented sample that shows how to use the streaming plugin with the secure plugin. It's hard to just guess the correct implementation.

Please note that your demo code samples show setting the file name in the anchor tag. That is impractable for my implementation as I need to pass the file URL into the javascript function. Can you please show how to get this to work by passing the url in to this function. I got this to work in 10 minutes for progressive download and then with some help from a forum member got rtmp streaming to work.

Please help and point out what I am doing wrong here :>

Thanks!
-JB


function playVideo(videoUrl) {

if (videoUrl.match(/.flv/) ) {
	videoUrl = 'flv:<my upload bucket>' + videoUrl;
} else if (videoUrl.match(/.mp4/) ) {
	videoUrl = 'mp4:<my upload bucket>' + videoUrl;
} else if (videoUrl.match(/.mp3/) ) {
	videoUrl = 'mp3:<my upload bucket>' + videoUrl;
}	

flowplayer("player", {src: 'flowplayer.commercial-3.1.5.swf', wmode: 'opaque'},
{
key: 'XXXXXXXXXXXXX',
clip: {
	autoPlay: true,
	autoBuffering: true,
	scaling: 'scale',

	provider: 'wowza',
	connectionProvider: 'secure', 
	url: videoUrl											
},			
plugins:{			
	wowza: {         
		url: 'flowplayer.rtmp-3.1.3.swf',						
		netConnectionUrl: 'rtmpt://e1f1.simplecdn.net/play'
	},
	secure: {
		url: 'flowplayer.securestreaming-3.1.1.swf',
		timestamp: '<?php echo time(); ?>',
		token: 'simplek'
	} 
},			
}
);
}

Posts:

Registered:

secure streaming plugin not loaded with simpleCDN

Posted: Nov 20, 2009

Hello everyone,

With the help of Blacktrash on this forum I was able to get the RTMP Streaming plugin to work fine with simpleCDN.

I then started to try to get the Secure Streaming plugin to work with simpleCDN by modifying my existing code but I get the Flowplayer error:

202, The provider specified in this clip is not loaded.

I have placed the secure plugin (flowplayer.securestreaming-3.1.1.swf) in the same folder where I place all of my Flowplayer files.

It's not entirely clear, but in some parts of the Flowplayer site it indicates that simpleCDN uses wowza and that the provider for the secure streaming plugin is "wowza."

I changed the provider from "simplecdn" to "wowza" and changed the url in the plugin so that it now points to the secure streaming plugin and not to the RTMP streaming plugin. I assume we only use one plugin.

I added a timestamp and token as per the flowplayer demo. For now, the token is visible in the <html>. When I get secure streaming to work I'll compile the token and part of the video file's URL in Flowplayer.
Does someone see/know what the problem/solution is?

Thanks!

-JB



//I'm getting the following Flowplayer error:
//202, The provider specified in this clip is not loaded.

function playVideo(videoUrl) {

//simpleCDN RTMP streaming plugin needed a file prefix
//that matches the file extension
if (videoUrl.match(/.flv/) ) {
	videoUrl = 'flv:<my upload bucket>' + videoUrl;
} else if (videoUrl.match(/.mp4/) ) {
	videoUrl = 'mp4:<my upload bucket>' + videoUrl;
} else if (videoUrl.match(/.mp3/) ) {
	videoUrl = 'mp3:<my upload bucket>' + videoUrl;
}	

flowplayer("player", {src: 'flowplayer.commercial-3.1.5.swf', wmode: 'opaque'}, {	
key: 'XXXXXXXXXXXXXXX',		
clip: {
		autoPlay: true,
		autoBuffering: true,
		scaling: 'scale',

		provider: 'wowza',
		url: videoUrl																		
},
plugins:{			
	wowza: {         
		url: 'flowplayer.securestreaming-3.1.1.swf',

		//the RTMP plugin worked fine when using provider: simplecdn
		//for RTMP streaming with simpleCDN
		//I assume we don't use this plugin when we use the 
		//woza secure streaming plugin
		
		//url: 'flowplayer.rtmp-3.1.3.swf',
		
		
		timestamp: '<?php echo time(); ?>',
								
		token: 'simplek',

		netConnectionUrl: 'rtmpt://e1f1.simplecdn.net/play' 
	}				
},			
}
);
}

Posts:

Registered:

Sample to configure Flowplayer for RTMP Streaming with SimpleCDN

Posted: Nov 19, 2009

Hello Blacktrash,

Adding the appropriate url prefix did the trick and RTMP streaming is now working on my site.

I'm learning step by step how to work with Flowplayer and video.

Now that I have RTMP streaming working I'll take a look at the secure plugin.

I included a sample for the benefit of other folks to show how to configure Flowplayer for RTMP Streaming with SimpleCDN. I decided to use simple JavaScript to handle adding the appropriate URL prefix.

Thanks again for your help!

-JB


//Sample to configure Flowplayer for RTMP Streaming with SimpleCDN

function playVideo(videoUrl) {

	//Different CDN providers have different syntax rules for how 
	//the video URL is passed to them.
	//Sometimes they want the url to contain the file extension 
	//and sometimes they don't.
	//simpleCDN requires the file extension AND also a URL prefix
	//to match the file extension.
	//Examples:
	//	URL = flv:<your upload bucket location>.flv
	//	URL = mp4:<your upload bucket location>.mp4
	//	URL = mp3:<your upload bucket location>.mp3	
	if (videoUrl.match(/.flv/) ) {
		videoUrl = 'flv:<your upload bucket location>' + videoUrl;
	} else if (videoUrl.match(/.mp4/) ) {
		videoUrl = 'mp4:<your upload bucket location>' + videoUrl;
	} else if (videoUrl.match(/.mp3/) ) {
		videoUrl = 'mp3:<your upload bucket location>' + videoUrl;
	} 
	

    flowplayer("player", {src: 'flowplayer.3.1.5.swf', wmode: 'opaque'},{
	
			clip: {
				autoPlay: true,
				autoBuffering: true,					

				provider: 'simplecdn',
				url: videoUrl,

				scaling: 'scale'										
			},
			
			plugins:{
			
				simplecdn: {         
					url: 'flowplayer.rtmp-3.1.3.swf',					
					netConnectionUrl: 'rtmpt://e1f1.simplecdn.net/play' 
				}				
			},			
		}
	);
}

Posts:

Registered:

» » Need help configure RTMP Streaming SimpleCDN

Posted: Nov 18, 2009

Thanks Blacktrash for the quick reply.

I forgot to use wrap my code in code tags. Thanks for the reminder to do so.

Ok, I see you say the prefix is what's missing in my code. I'll try a little later today to add the prefix and see if it works.

Thanks!

-JB

........................................................

Hello everyone,

I recently purchased the commercial version of Flowplayer and currently have it configured fine for progressive download of .flv, mp4 videos and .mp3 audio. I would greatly appreciate some help/advice how to configure RTMP streaming with SimpleCDN.

I submitted the following ticket to simpleCDN - I don't know how long it will take for them to respond. I'll post theire reply here for the benefit of others.

Thanks!

Jerry

++++++++++++++++++++++++++++++++++++++++++++

How to configure RTMP streaming with Flowplayer
Hello,

I tried your CDN service this week. I love it and think you have a terrific service that I will recommend to colleages.

It was "simple" and "fast" to set up and integrate with my web applicaton which currently implements progressive
download with Flowplayer.

It took about 10 minutes including creating my account with simpleCDN and modifiying my exisiting JavaScript and
PHP code to point to simpleCDN for videos, etc. instead of my webserver. Naturally, FTPing all of my content
to simpleCDN took a tad more time :>

I have never implemented RTMP streaming (I only recently began to work with video).

MY PROBLEM
I can't figure out how to modify my existing code (for progresive download) to get RTMP streaming to work.
Your help is greatly appreciated.

I am using the latest commercial version of Flowplayer.

HERE'S MY WORKING CODE FOR PROGRESSIVE DOWNLOAD (I changed my webserver's domain to "example")

Please note that I have downloaded the Flowplayer RTMP Streaming Plugin (flowplayer.rtmp-3.1.3.swf) and I placed it
in the same folder as my Flowplayer (flowplayer.commercial-3.1.5.swf). I also have the Flowplayer Audio plugin installed (flowplayer.audio-3.1.2.swf)

PROGRESSIVE DOWNLOADED VIDEO

THE FOLLOWING CODE WORKS FINE TO DISPLAY PROGRESSIVE DOWNLOADED VIDEOS(.flv, .mp4 and .mp3).

//PHP Page that renders html and video to browser

function playVideo(myVideoUrl) { 

flowplayer("player", {src: 'http://e1.simplecdn.net/exampleuploadbucket/video/flowplayer.commercial-3.1.5.swf', wmode: 'opaque'}, {

key: 'examplekey#',

clip: {
autoPlay: true,
autoBuffering: true,
baseUrl: 'http://www.example.com/pages/',

//to cloak the url/folder where videos are located we pass the videoID to a PHP page 
//to return the complete URL to Flowplayer

url: escape('play.php?vid=' + myVideoUrl), 

scaling: 'scale', 
} 
},

plugins:{
controls:{
autoHide: 'always'
}
},
}
);
}

/http://www.example.com/pages/play.php 

$vid = (isset($_GET['vid']))? $_GET['vid'] : '';

//video urls are stored in an xml and file and the path to the video is retrieved from the xml here

$xml = simplexml_load_file("videos.xml");
$video = $xml->xpath("//*[id='$vid']");
$videourl = http://e1.simplecdn.net/exampleuploadbucket/video" . "{$video[0]->videourl}";

//this shows the exploded url that is returned to Flowplayer
//$videourl = http://e1.simplecdn.net/exampleuploadbucket/video/filename.mp4"; // or filename.flv or filename .mp3 

#echo $videourl;
header("Location: $videourl");
?>

RTMP STREAMING VIDEO


THE FOLLOWING CODE LOADS THE FLOWPLAYER BUT MY CONFIGURATION IS WRONG BECAUSE FLOWPLAYER DISPLAYS AN ERROR
THAT IT CAN'T FIND MY SPECIFIED VIDEO FILE.

200, Stream not found, NetStream.Play.StreamNotFound, clip: '[Clip] 'play.php?vid=100' 
(where 100 is the correct videoID of my specified video I'm trying to stream)
I have reviwed the sample code on Flowplayer.org and and SimpleCDN.com and I can't figure out how to make this work.

I noticed the following line in the SimpleCDN sample code:

'mp4:sfexamples/videos/bbb_640x360_h264.mp4',

I know I am not following that syntax and is this indicating that I will have to preface each video file path by its
file extension? If so, I will have to change the format that I am storing content URLs and then do some work to
generate the correct prefix for each video's path - I don't understand why simpleCDN or Flowplayer would not do this under
the covers if it really needs to be done. Then again, I'm sure there's a "simple" solution that you folks know :>

Thank you in advance for your help.



//PHP Page that renders html and video to browser

function playVideo(myVideoUrl) { 

flowplayer("player", {src: 'http://e1.simplecdn.net/exampleuploadbucket/video/flowplayer.commercial-3.1.5.swf', wmode: 'opaque'}, {

key: 'examplekey#',

clip: {
autoPlay: true,
autoBuffering: true,
baseUrl: 'http://www.example.com/pages/',

//to cloak the url/folder where videos are located we pass the videoID to a PHP page 
//to return the complete URL to Flowplayer

url: escape('play.php?vid=' + myVideoUrl),

//for simpleCDN RTMP streming
provider: 'simplecdn',

scaling: 'scale', 
} 
},

plugins:{

controls:{
autoHide: 'always'
},

//for simpleCDN RTMP streming
simplecdn: { 
url: 'http://e1.simplecdn.net/exampleuploadbucket/video/flowplayer.rtmp-3.1.3.swf',
netConnectionUrl: 'rtmpt://e1f1.simplecdn.net/play' 
} 
},
}
);
}

/http://www.example.com/pages/play.php 

$vid = (isset($_GET['vid']))? $_GET['vid'] : '';

//video urls are stored in an xml and file and the path to the video is retrieved from the xml here

$xml = simplexml_load_file("videos.xml");
$video = $xml->xpath("//*[id='$vid']");

//simpleCDN RTMP stream location
$videourl = "rtmp://e1f1.simplecdn.net/play/_definst_/exampleuploadbucket/video" . "{$video[0]->videourl}";

//this shows the exploded url that is returned to Flowplayer
//$videourl = http://e1.simplecdn.net/exampleuploadbucket/video/filename.mp4"; // or filename.flv or filename .mp3"; 

#echo $videourl;
header("Location: $videourl");
?>
Cheers!

Jerry Bruckner

Posts:

Registered:

Need help configure RTMP Streaming SimpleCDN

Posted: Nov 18, 2009

Hello everyone,

I recently purchased the commercial version of Flowplayer and currently have it configured fine for progressive download of .flv, mp4 videos and .mp3 audio. I would greatly appreciate some help/advice how to configure RTMP streaming with SimpleCDN.

I submitted the following ticket to simpleCDN - I don't know how long it will take for them to respond. I'll post theire reply here for the benefit of others.

Thanks!

Jerry

++++++++++++++++++++++++++++++++++++++++++++

How to configure RTMP streaming with Flowplayer
Hello,

I tried your CDN service this week. I love it and think you have a terrific service that I will recommend to colleages.

It was "simple" and "fast" to set up and integrate with my web applicaton which currently implements progressive
download with Flowplayer.

It took about 10 minutes including creating my account with simpleCDN and modifiying my exisiting JavaScript and
PHP code to point to simpleCDN for videos, etc. instead of my webserver. Naturally, FTPing all of my content
to simpleCDN took a tad more time :>

I have never implemented RTMP streaming (I only recently began to work with video).

MY PROBLEM
I can't figure out how to modify my existing code (for progresive download) to get RTMP streaming to work.
Your help is greatly appreciated.

I am using the latest commercial version of Flowplayer.

HERE'S MY WORKING CODE FOR PROGRESSIVE DOWNLOAD (I changed my webserver's domain to "example")

Please note that I have downloaded the Flowplayer RTMP Streaming Plugin (flowplayer.rtmp-3.1.3.swf) and I placed it
in the same folder as my Flowplayer (flowplayer.commercial-3.1.5.swf). I also have the Flowplayer Audio plugin installed (flowplayer.audio-3.1.2.swf)

PROGRESSIVE DOWNLOADED VIDEO

THE FOLLOWING CODE WORKS FINE TO DISPLAY PROGRESSIVE DOWNLOADED VIDEOS(.flv, .mp4 and .mp3).

//PHP Page that renders html and video to browser

function playVideo(myVideoUrl) {

flowplayer("player", {src: 'http://e1.simplecdn.net/exampleuploadbucket/video/flowplayer.commercial-3.1.5.swf', wmode: 'opaque'}, {

key: 'examplekey#',

clip: {
autoPlay: true,
autoBuffering: true,
baseUrl: 'http://www.example.com/pages/',

//to cloak the url/folder where videos are located we pass the videoID to a PHP page
//to return the complete URL to Flowplayer

url: escape('play.php?vid=' + myVideoUrl),

scaling: 'scale',
}
},

plugins:{
controls:{
autoHide: 'always'
}
},
}
);
}

/http://www.example.com/pages/play.php

$vid = (isset($_GET['vid']))? $_GET['vid'] : '';

//video urls are stored in an xml and file and the path to the video is retrieved from the xml here

$xml = simplexml_load_file("videos.xml");
$video = $xml->xpath("//*[id='$vid']");
$videourl = http://e1.simplecdn.net/exampleuploadbucket/video" . "{$video[0]->videourl}";

//this shows the exploded url that is returned to Flowplayer
//$videourl = http://e1.simplecdn.net/exampleuploadbucket/video/filename.mp4"; // or filename.flv or filename .mp3

#echo $videourl;
header("Location: $videourl");
?>

RTMP STREAMING VIDEO

THE FOLLOWING CODE LOADS THE FLOWPLAYER BUT MY CONFIGURATION IS WRONG BECAUSE FLOWPLAYER DISPLAYS AN ERROR
THAT IT CAN'T FIND MY SPECIFIED VIDEO FILE.
200, Stream not found, NetStream.Play.StreamNotFound, clip: '[Clip] 'play.php?vid=100'
(where 100 is the correct videoID of my specified video I'm trying to stream)

I have reviwed the sample code on Flowplayer.org and and SimpleCDN.com and I can't figure out how to make this work.

I noticed the following line in the SimpleCDN sample code:
'mp4:sfexamples/videos/bbb_640x360_h264.mp4',

I know I am not following that syntax and is this indicating that I will have to preface each video file path by its
file extension? If so, I will have to change the format that I am storing content URLs and then do some work to
generate the correct prefix for each video's path - I don't understand why simpleCDN or Flowplayer would not do this under
the covers if it really needs to be done. Then again, I'm sure there's a "simple" solution that you folks know :>

Thank you in advance for your help.

//PHP Page that renders html and video to browser

function playVideo(myVideoUrl) {

flowplayer("player", {src: 'http://e1.simplecdn.net/exampleuploadbucket/video/flowplayer.commercial-3.1.5.swf', wmode: 'opaque'}, {

key: 'examplekey#',

clip: {
autoPlay: true,
autoBuffering: true,
baseUrl: 'http://www.example.com/pages/',

//to cloak the url/folder where videos are located we pass the videoID to a PHP page
//to return the complete URL to Flowplayer

url: escape('play.php?vid=' + myVideoUrl),

//for simpleCDN RTMP streming
provider: 'simplecdn',

scaling: 'scale',
}
},

plugins:{

controls:{
autoHide: 'always'
},

//for simpleCDN RTMP streming
simplecdn: {
url: 'http://e1.simplecdn.net/exampleuploadbucket/video/flowplayer.rtmp-3.1.3.swf',
netConnectionUrl: 'rtmpt://e1f1.simplecdn.net/play'
}
},
}
);
}

/http://www.example.com/pages/play.php

$vid = (isset($_GET['vid']))? $_GET['vid'] : '';

//video urls are stored in an xml and file and the path to the video is retrieved from the xml here

$xml = simplexml_load_file("videos.xml");
$video = $xml->xpath("//*[id='$vid']");

//simpleCDN RTMP stream location
$videourl = "rtmp://e1f1.simplecdn.net/play/_definst_/exampleuploadbucket/video" . "{$video[0]->videourl}";

//this shows the exploded url that is returned to Flowplayer
//$videourl = http://e1.simplecdn.net/exampleuploadbucket/video/filename.mp4"; // or filename.flv or filename .mp3";

#echo $videourl;
header("Location: $videourl");
?>

Cheers!

Jerry Bruckner

Posts:

Registered:

» » » » » How to use PHP as source of video stream?

Posted: Nov 15, 2009

Odd, for some reason this line the ampersand and param name was mangled in my 1st email.

It should be..
//how to pass in multiple params //url: escape('play.php?vid=' + myVideoUrl + '¶,Name2=' + paramvalue2),

Hoepefully, it won't get mangled this time.

-JB

Posts:

Registered:

» » » » How to use PHP as source of video stream?

Posted: Nov 15, 2009

jet7,

Here's an additional example. It's a minimal example I quickly copy/pasted from my working application that shows how to pass one or more params to Flowplayer and then pass that param to .php and have .php return your video URL to Flowplayer.

I cut and pasted pretty quickly and removed code not needed for this minimal example and I added comments for you.

HTH,

-JB


//play.php
<?php	// retrieve passed in querystring param
	$vid = (isset($_GET['vid']))? $_GET['vid'] : '';
	
	//do something here with the param you passed to return the full video URL to Flowplayer
	//i.e., you may have your video metadata stored in a database, xml file, etc...
	
	header("Location: $videourl");
?>

function playVideo(myVideoUrl) {
				//wmode setting is not relevant to passing params
	flowplayer("player", {src: 'https://www.example/flowplayer.commercial-3.1.5.swf', wmode: 'opaque'}, 
		
			clip: {
				autoPlay: true,		// this setting is not relevant to passing params
				autoBuffering: true,	// this setting is not relevant to passing params

				//optionally, for greater security construct the baseURL in your .php file
				baseUrl: 'https://www.example.com/phppages/',

				//this is the relevant line that indicates
				//how to pass 1 param to flowplayer with JavaScript
				//note that querystring must be escaped

				//hard coded param
				url: escape('play.php?vid=100'),

				//or use dynamic javascript param
				url: escape('play.php?vid=' + myVideoUrl),

				//how to pass in multiple params
				//url: escape('play.php?vid=' + myVideoUrl + '¶mName2=' + paramvalue2),

				scaling: 'scale' /this setting is not releveant to passing params											
			}
		}
	);
}

Posts:

Registered:

» » » » » using complex url

Posted: Nov 14, 2009

I previously replied without looking at your code sample.

You currently have this line of Javascript which is using semi-colons as delimit the params which is breaking the javascript.

url: escape('index.php?action=mgallery;sa=media;id=150'),

Try changing it to use ampersands:

url: escape('index.php?action=mgallery&sa=media&id=150'),

Posts:

Registered:

» » » » using complex url

Posted: Nov 14, 2009

Clarification:

To be clear, Flowplayer video player plays video with audio on the video out of the box. The audio plugin is needed to play mp3.

Posts:

Registered:

» » » using complex url

Posted: Nov 14, 2009

To play audio Flowplayer needs the Flowplayer audio plugin. Are you using the audio plugin?

http://flowplayer.org/plugins/streaming/audio.html

Scroll down to bottom of that page for a link to the audio plugin

The simple config is to just place the flowplayer.audio-3.1.2.swf into the same folder where you have your player. The player code will automatically recognize and use the audio plugin.

This works for me...

-JB

Posts:

Registered:

» using complex url

Posted: Nov 14, 2009

IdanC,

How to pass querystring params with Flowplayer is described at:

http://flowplayer.org/forum/3/29492#post-29492

Cheers,

-JB