Jump to content

Flowplayer configuration problem


Audiotech

Recommended Posts

I seem to be having a bit of trouble getting flowplayer to work on my page the way I'd like it.  What I'm trying to do is have it run both flv's as well as mp3's off of an anchor tag.  I've got it set up so that videos work, however I'm getting errors when trying to play mp3's. 

 

Could somebody please look at the code and tell me what I'm doing wrong?  Any help would be greatly appreciated.

 

-Carl

 

<!-- player container-->
<a href="controls.flv" style="display:block;width:400px;height:300px;" 
id="player">
</a>

<div id="clips">
<a href="controls.flv">Front panel controls</a>
<a href="sample_6.mp3">MP3 audio clip</a>
</div>

<script>
//  install Flowplayer inside a#player
$f("player", "swf/flowplayer-3.1.5.swf", {

clip: {

	// use baseUrl so we can play with shorter file names, use ../media for local
	baseUrl: '../media',

	// use first frame of the clip as a splash screen
	autoPlay: false,
	autoBuffering: true
} 
});

// get all links that are inside div#clips
var links = document.getElementById("clips").getElementsByTagName("a");

// loop those links and alter their click behaviour
for (var i = 0; i < links.length; i++) {
links[i].onclick = function() {

	// play the clip specified in href- attribute with Flowplayer
	$f().play(this.getAttribute("href", 2));

	// by returning false normal link behaviour is skipped
	return false;
}
}
</script>

Link to comment
https://forums.phpfreaks.com/topic/190455-flowplayer-configuration-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.