Revision history for Mp3Player
Revision [23222]
Last edited on 2016-05-20 07:38:47 by BrianKoontz [Replaces old-style internal links with new pipe-split links.]Additions:
You also need the SWF file, called hbs_mp3_player.swf which is available [[http://hotpot.uvic.ca/howto/hbs_mp3_player.swf | here]]. This site also provides the fla file in this [[http://hotpot.uvic.ca/howto/audio.htm | tutorial]] to allow further modification (I'm quite primitive in flash, so no hope of me doing any). I've installed this file in a directory called ##flashtools## which is in my wiki root.
Deletions:
Revision [19194]
Edited on 2008-01-28 00:14:43 by BrianKoontz [Modified links pointing to docs server]No Differences
Additions:
~&Maybe use this player instead, which uses html for the gui : http://www.kyberfabrikken.dk/opensource/playa/
add the following code to your ##actions## directory as ##audio.php##.
%%(php)
<?php
// audio.php was developed by GmBowen for a SSHRC research project from code provided to enact a swf file for playing audio
// which is posted at http://hotpot.uvic.ca/howto/audio.htm. The swf file is available from
// http://hotpot.uvic.ca/howto/hbs_mp3_player.swf
// USE: {{audio url="http://..." [title="title"]}} Title is optional, a url must be provided.
//
// the "-16" below is based on there being 16 characters in the suffix after the wikki root
// for example "wikiroot/wakka.php?wakka=" has 16 characters in "wakka.php?wakka="...if your site setup differs you must
// change the "-16" to whatever the character count is.
$site_base = $this->GetConfigValue("base_url");
$site_base = substr($site_base,0,-16);
$site_base = $site_base."flashtools/";
$player = $site_base."hbs_mp3_player.swf";
if (!($url)) {echo "<strong>You must provide the url, including http://, as an audio file source. </strong>"; return;
}else{
echo $title." ";
}
if ($player)
echo '<object data="hbs_mp3_player.swf" width="24" height="17" style="vertical-align: bottom;" type="application/x-shockwave-flash">
<param name="type" value="application/x-shockwave-flash" />
<param name="src" value="'.$player.'" />
<param name="data" value="'.$player.'" />
<param name="codebase" value="'.$player.'" />
<param name="FlashVars" value="TheSound='.$url.'" />
<param name="movie" value="'.$player.'" />
<param name="loop" value="false" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<a href="'.$url.'">"'.$url.'"</a>
</object>';
// add the following line after the FlashVars line if you want to restrict urls to the server the flash file is found on
// <param name="allowScriptAccess" value="sameDomain" />
// in that case, relative urls are usable.
?>
%%
You also need the SWF file, called hbs_mp3_player.swf which is available [[http://hotpot.uvic.ca/howto/hbs_mp3_player.swf here]]. This site also provides the fla file in this [[http://hotpot.uvic.ca/howto/audio.htm tutorial]] to allow further modification (I'm quite primitive in flash, so no hope of me doing any). I've installed this file in a directory called ##flashtools## which is in my wiki root.
Using this code, if you typed in...
""{{audio url="http://hotpot.uvic.ca/howto/narrative1.mp3" title="Test Sound"}}""
you'd see.....
http://gmbowen.educ.unb.ca/wikitest/audioimg.jpg
add the following code to your ##actions## directory as ##audio.php##.
%%(php)
<?php
// audio.php was developed by GmBowen for a SSHRC research project from code provided to enact a swf file for playing audio
// which is posted at http://hotpot.uvic.ca/howto/audio.htm. The swf file is available from
// http://hotpot.uvic.ca/howto/hbs_mp3_player.swf
// USE: {{audio url="http://..." [title="title"]}} Title is optional, a url must be provided.
//
// the "-16" below is based on there being 16 characters in the suffix after the wikki root
// for example "wikiroot/wakka.php?wakka=" has 16 characters in "wakka.php?wakka="...if your site setup differs you must
// change the "-16" to whatever the character count is.
$site_base = $this->GetConfigValue("base_url");
$site_base = substr($site_base,0,-16);
$site_base = $site_base."flashtools/";
$player = $site_base."hbs_mp3_player.swf";
if (!($url)) {echo "<strong>You must provide the url, including http://, as an audio file source. </strong>"; return;
}else{
echo $title." ";
}
if ($player)
echo '<object data="hbs_mp3_player.swf" width="24" height="17" style="vertical-align: bottom;" type="application/x-shockwave-flash">
<param name="type" value="application/x-shockwave-flash" />
<param name="src" value="'.$player.'" />
<param name="data" value="'.$player.'" />
<param name="codebase" value="'.$player.'" />
<param name="FlashVars" value="TheSound='.$url.'" />
<param name="movie" value="'.$player.'" />
<param name="loop" value="false" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<a href="'.$url.'">"'.$url.'"</a>
</object>';
// add the following line after the FlashVars line if you want to restrict urls to the server the flash file is found on
// <param name="allowScriptAccess" value="sameDomain" />
// in that case, relative urls are usable.
?>
%%
You also need the SWF file, called hbs_mp3_player.swf which is available [[http://hotpot.uvic.ca/howto/hbs_mp3_player.swf here]]. This site also provides the fla file in this [[http://hotpot.uvic.ca/howto/audio.htm tutorial]] to allow further modification (I'm quite primitive in flash, so no hope of me doing any). I've installed this file in a directory called ##flashtools## which is in my wiki root.
Using this code, if you typed in...
""{{audio url="http://hotpot.uvic.ca/howto/narrative1.mp3" title="Test Sound"}}""
you'd see.....
http://gmbowen.educ.unb.ca/wikitest/audioimg.jpg
Deletions:
Additions:
~
Deletions:
add the following code to your ##actions## directory as ##audio.php##.
%%(php)
<?php
// audio.php was developed by GmBowen for a SSHRC research project from code provided to enact a swf file for playing audio
// which is posted at http://hotpot.uvic.ca/howto/audio.htm. The swf file is available from
// http://hotpot.uvic.ca/howto/hbs_mp3_player.swf
// USE: {{audio url="http://..." [title="title"]}} Title is optional, a url must be provided.
//
// the "-16" below is based on there being 16 characters in the suffix after the wikki root
// for example "wikiroot/wakka.php?wakka=" has 16 characters in "wakka.php?wakka="...if your site setup differs you must
// change the "-16" to whatever the character count is.
$site_base = $this->GetConfigValue("base_url");
$site_base = substr($site_base,0,-16);
$site_base = $site_base."flashtools/";
$player = $site_base."hbs_mp3_player.swf";
if (!($url)) {echo "<strong>You must provide the url, including http://, as an audio file source. </strong>"; return;
}else{
echo $title." ";
}
if ($player)
echo '<object data="hbs_mp3_player.swf" width="24" height="17" style="vertical-align: bottom;" type="application/x-shockwave-flash">
<param name="type" value="application/x-shockwave-flash" />
<param name="src" value="'.$player.'" />
<param name="data" value="'.$player.'" />
<param name="codebase" value="'.$player.'" />
<param name="FlashVars" value="TheSound='.$url.'" />
<param name="movie" value="'.$player.'" />
<param name="loop" value="false" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<a href="'.$url.'">"'.$url.'"</a>
</object>';
// add the following line after the FlashVars line if you want to restrict urls to the server the flash file is found on
// <param name="allowScriptAccess" value="sameDomain" />
// in that case, relative urls are usable.
?>
%%
You also need the SWF file, called hbs_mp3_player.swf which is available [[http://hotpot.uvic.ca/howto/hbs_mp3_player.swf here]]. This site also provides the fla file in this [[http://hotpot.uvic.ca/howto/audio.htm tutorial]] to allow further modification (I'm quite primitive in flash, so no hope of me doing any). I've installed this file in a directory called ##flashtools## which is in my wiki root.
Using this code, if you typed in...
""{{audio url="http://hotpot.uvic.ca/howto/narrative1.mp3" title="Test Sound"}}""
you'd see.....
http://gmbowen.educ.unb.ca/wikitest/audioimg.jpg
Additions:
// which is posted at http://hotpot.uvic.ca/howto/audio.htm. The swf file is available from
// http://hotpot.uvic.ca/howto/hbs_mp3_player.swf
You also need the SWF file, called hbs_mp3_player.swf which is available [[http://hotpot.uvic.ca/howto/hbs_mp3_player.swf here]]. This site also provides the fla file in this [[http://hotpot.uvic.ca/howto/audio.htm tutorial]] to allow further modification (I'm quite primitive in flash, so no hope of me doing any). I've installed this file in a directory called ##flashtools## which is in my wiki root.
""{{audio url="http://hotpot.uvic.ca/howto/narrative1.mp3" title="Test Sound"}}""
// http://hotpot.uvic.ca/howto/hbs_mp3_player.swf
You also need the SWF file, called hbs_mp3_player.swf which is available [[http://hotpot.uvic.ca/howto/hbs_mp3_player.swf here]]. This site also provides the fla file in this [[http://hotpot.uvic.ca/howto/audio.htm tutorial]] to allow further modification (I'm quite primitive in flash, so no hope of me doing any). I've installed this file in a directory called ##flashtools## which is in my wiki root.
""{{audio url="http://hotpot.uvic.ca/howto/narrative1.mp3" title="Test Sound"}}""
Deletions:
// http://web.uvic.ca/hrd/halfbaked/howto/hbs_mp3_player.swf
You also need the SWF file, called hbs_mp3_player.swf which is available [[http://web.uvic.ca/hrd/halfbaked/howto/hbs_mp3_player.swf here]]. This site also provides the fla file in this [[http://web.uvic.ca/hrd/halfbaked/howto/audio.htm tutorial]] to allow further modification (I'm quite primitive in flash, so no hope of me doing any). I've installed this file in a directory called ##flashtools## which is in my wiki root.
""{{audio url="http://web.uvic.ca/hrd/halfbaked/howto/narrative1.mp3" title="Test Sound"}}""
Additions:
====Simple MP3 Player====
I'm interested in providing some "audio" links on my pages both for some variety (in recognition of different learning styles), but also so that a few basic introductions can be done in audio so that visually impaired people can listen to descriptions of some features. [**Note:** I recognize that it would be useful if the flash had a floating tooltips sort of feature, like images, but I don't know how to do that. Feel free to add it to the code below if you know how to add "alt" equivalency to flash.].
~&Maybe use this player instead, which uses html for the gui : http://www.kyberfabrikken.dk/opensource/playa/
add the following code to your ##actions## directory as ##audio.php##.
%%(php)
<?php
// audio.php was developed by GmBowen for a SSHRC research project from code provided to enact a swf file for playing audio
// which is posted at http://web.uvic.ca/hrd/halfbaked/howto/audio.htm. The swf file is available from
// http://web.uvic.ca/hrd/halfbaked/howto/hbs_mp3_player.swf
// USE: {{audio url="http://..." [title="title"]}} Title is optional, a url must be provided.
//
// the "-16" below is based on there being 16 characters in the suffix after the wikki root
// for example "wikiroot/wakka.php?wakka=" has 16 characters in "wakka.php?wakka="...if your site setup differs you must
// change the "-16" to whatever the character count is.
$site_base = $this->GetConfigValue("base_url");
$site_base = substr($site_base,0,-16);
$site_base = $site_base."flashtools/";
$player = $site_base."hbs_mp3_player.swf";
if (!($url)) {echo "<strong>You must provide the url, including http://, as an audio file source. </strong>"; return;
}else{
echo $title." ";
}
if ($player)
echo '<object data="hbs_mp3_player.swf" width="24" height="17" style="vertical-align: bottom;" type="application/x-shockwave-flash">
<param name="type" value="application/x-shockwave-flash" />
<param name="src" value="'.$player.'" />
<param name="data" value="'.$player.'" />
<param name="codebase" value="'.$player.'" />
<param name="FlashVars" value="TheSound='.$url.'" />
<param name="movie" value="'.$player.'" />
<param name="loop" value="false" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<a href="'.$url.'">"'.$url.'"</a>
</object>';
// add the following line after the FlashVars line if you want to restrict urls to the server the flash file is found on
// <param name="allowScriptAccess" value="sameDomain" />
// in that case, relative urls are usable.
?>
%%
You also need the SWF file, called hbs_mp3_player.swf which is available [[http://web.uvic.ca/hrd/halfbaked/howto/hbs_mp3_player.swf here]]. This site also provides the fla file in this [[http://web.uvic.ca/hrd/halfbaked/howto/audio.htm tutorial]] to allow further modification (I'm quite primitive in flash, so no hope of me doing any). I've installed this file in a directory called ##flashtools## which is in my wiki root.
Using this code, if you typed in...
""{{audio url="http://web.uvic.ca/hrd/halfbaked/howto/narrative1.mp3" title="Test Sound"}}""
you'd see.....
I'm interested in providing some "audio" links on my pages both for some variety (in recognition of different learning styles), but also so that a few basic introductions can be done in audio so that visually impaired people can listen to descriptions of some features. [**Note:** I recognize that it would be useful if the flash had a floating tooltips sort of feature, like images, but I don't know how to do that. Feel free to add it to the code below if you know how to add "alt" equivalency to flash.].
~&Maybe use this player instead, which uses html for the gui : http://www.kyberfabrikken.dk/opensource/playa/
add the following code to your ##actions## directory as ##audio.php##.
%%(php)
<?php
// audio.php was developed by GmBowen for a SSHRC research project from code provided to enact a swf file for playing audio
// which is posted at http://web.uvic.ca/hrd/halfbaked/howto/audio.htm. The swf file is available from
// http://web.uvic.ca/hrd/halfbaked/howto/hbs_mp3_player.swf
// USE: {{audio url="http://..." [title="title"]}} Title is optional, a url must be provided.
//
// the "-16" below is based on there being 16 characters in the suffix after the wikki root
// for example "wikiroot/wakka.php?wakka=" has 16 characters in "wakka.php?wakka="...if your site setup differs you must
// change the "-16" to whatever the character count is.
$site_base = $this->GetConfigValue("base_url");
$site_base = substr($site_base,0,-16);
$site_base = $site_base."flashtools/";
$player = $site_base."hbs_mp3_player.swf";
if (!($url)) {echo "<strong>You must provide the url, including http://, as an audio file source. </strong>"; return;
}else{
echo $title." ";
}
if ($player)
echo '<object data="hbs_mp3_player.swf" width="24" height="17" style="vertical-align: bottom;" type="application/x-shockwave-flash">
<param name="type" value="application/x-shockwave-flash" />
<param name="src" value="'.$player.'" />
<param name="data" value="'.$player.'" />
<param name="codebase" value="'.$player.'" />
<param name="FlashVars" value="TheSound='.$url.'" />
<param name="movie" value="'.$player.'" />
<param name="loop" value="false" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<a href="'.$url.'">"'.$url.'"</a>
</object>';
// add the following line after the FlashVars line if you want to restrict urls to the server the flash file is found on
// <param name="allowScriptAccess" value="sameDomain" />
// in that case, relative urls are usable.
?>
%%
You also need the SWF file, called hbs_mp3_player.swf which is available [[http://web.uvic.ca/hrd/halfbaked/howto/hbs_mp3_player.swf here]]. This site also provides the fla file in this [[http://web.uvic.ca/hrd/halfbaked/howto/audio.htm tutorial]] to allow further modification (I'm quite primitive in flash, so no hope of me doing any). I've installed this file in a directory called ##flashtools## which is in my wiki root.
Using this code, if you typed in...
""{{audio url="http://web.uvic.ca/hrd/halfbaked/howto/narrative1.mp3" title="Test Sound"}}""
you'd see.....
Deletions:
I'm interested in providing some "audio" links on my pages both for some variety (in recognition of different learning styles), but also so that a few basic introductions can be done in audio so that visually impaired people can listen to descriptions of some features. [**Note:** I recognize that it would be useful if the flash had a floating tooltips sort of feature, like images, but I don't know how to do that. Feel free to add it to the code below if you know how to add "alt" equivalency to flash.].
add the following code to your ##actions## directory as ##audio.php##.
%%(php)
<?php
// audio.php was developed by GmBowen for a SSHRC research project from code provided to enact a swf file for playing audio
// which is posted at http://web.uvic.ca/hrd/halfbaked/howto/audio.htm. The swf file is available from
// http://web.uvic.ca/hrd/halfbaked/howto/hbs_mp3_player.swf
// USE: {{audio url="http://..." [title="title"]}} Title is optional, a url must be provided.
//
// the "-16" below is based on there being 16 characters in the suffix after the wikki root
// for example "wikiroot/wakka.php?wakka=" has 16 characters in "wakka.php?wakka="...if your site setup differs you must
// change the "-16" to whatever the character count is.
$site_base = $this->GetConfigValue("base_url");
$site_base = substr($site_base,0,-16);
$site_base = $site_base."flashtools/";
$player = $site_base."hbs_mp3_player.swf";
if (!($url)) {echo "<strong>You must provide the url, including http://, as an audio file source. </strong>"; return;
}else{
echo $title." ";
}
if ($player)
echo '<object data="hbs_mp3_player.swf" width="24" height="17" style="vertical-align: bottom;" type="application/x-shockwave-flash">
<param name="type" value="application/x-shockwave-flash" />
<param name="src" value="'.$player.'" />
<param name="data" value="'.$player.'" />
<param name="codebase" value="'.$player.'" />
<param name="FlashVars" value="TheSound='.$url.'" />
<param name="movie" value="'.$player.'" />
<param name="loop" value="false" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<a href="'.$url.'">"'.$url.'"</a>
</object>';
// add the following line after the FlashVars line if you want to restrict urls to the server the flash file is found on
// <param name="allowScriptAccess" value="sameDomain" />
// in that case, relative urls are usable.
?>
%%
You also need the SWF file, called hbs_mp3_player.swf which is available [[http://web.uvic.ca/hrd/halfbaked/howto/hbs_mp3_player.swf here]]. This site also provides the fla file in this [[http://web.uvic.ca/hrd/halfbaked/howto/audio.htm tutorial]] to allow further modification (I'm quite primitive in flash, so no hope of me doing any). I've installed this file in a directory called ##flashtools## which is in my wiki root.
Using this code, if you typed in...
""{{audio url="http://web.uvic.ca/hrd/halfbaked/howto/narrative1.mp3" title="Test Sound"}}""
you'd see.....
Revision [5345]
Edited on 2005-01-28 17:24:07 by GmBowen [initial release of simple mp3 player code (using flash) (typo repair)]Additions:
You also need the SWF file, called hbs_mp3_player.swf which is available [[http://web.uvic.ca/hrd/halfbaked/howto/hbs_mp3_player.swf here]]. This site also provides the fla file in this [[http://web.uvic.ca/hrd/halfbaked/howto/audio.htm tutorial]] to allow further modification (I'm quite primitive in flash, so no hope of me doing any). I've installed this file in a directory called ##flashtools## which is in my wiki root.
Deletions:
Revision [5344]
Edited on 2005-01-28 17:22:07 by GmBowen [initial release of flash mp3 player code (typo2)]Additions:
You also need the SWF file, called hbs_mp3_player.swf which is available [[http://web.uvic.ca/hrd/halfbaked/howto/hbs_mp3_player.swf here]]. This site also provides the [[http://web.uvic.ca/hrd/halfbaked/howto/ fla file]] to allow further modification (I'm quite primitive in flash, so no hope of me doing any). I've installed this file in a directory called ##flashtools## which is in my wiki root.
Deletions:
Revision [5343]
Edited on 2005-01-28 17:21:26 by GmBowen [initial release of simple flash mp3 player code (typo)]Additions:
""{{audio url="http://web.uvic.ca/hrd/halfbaked/howto/narrative1.mp3" title="Test Sound"}}""