Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.