PHP Classes


Recommend this page to a friend!
  Classes of Carl Friis-Hansen  >  Audio Play  >  INSTALL  >  Download  
Role: Documentation
Content type: text/plain
Description: Installation
Class: Audio Play
Embed a sound player on a Web page using Flash
Author: By
Last change:
Date: 9 years ago
Size: 1,459 bytes


Class file image Download
Installation of class.splay.php

As described in the class itself, you must acquire the stand-alone flash player from and select the standalone version, install the audio-player.js and the player.swf in a 
public accessible directory.  The audio_play.php will by default search for these two files in './js'. 

After the installation of all three files:
you should be ready to use it on one of you web pages as described in the example in 
the class file.

CodeIgniter example

	$pl = new audio_play;
	$data['incl'].= $pl->get_header_player_js ();
	$data['incl'].= $pl->get_header_player_swf ();
	$pl->set_option_width (350);
	$pl->set_option_initialvolume (60);
	$pl->set_option_animation ('no');

	$pl->set_option_titles ('Run');
	$pl->set_option_artists ('Ramona Fottner');
	$data2['audioplayer']  = $pl->play ('/Ramona Fottner - Run.mp3');
	$data2['audioplayer'] .= '<br />';

	$pl->set_option_titles ('Nutze Den Tag');
	$pl->set_option_artists ('Freddy Sahin-Scholl');
	$data2['audioplayer'] .= $pl->play ('/Freddy Sahin-Scholl - Nutze Den Tag.mp3');
	$data2['audioplayer'] .= '<br />'

	$this->load->view('header2', $data);
	$this->load->view('carl', $data2);

	<?php echo $audioplayer; ?>

Good luck
Carl Friis-Hansen

For more information send a message to info at phpclasses dot org.