Adding Odeo Mp3 format
parent
5443919c6f
commit
efa1b44dca
|
|
@ -3,7 +3,7 @@
|
||||||
<label for="url">MP3 URL</label>
|
<label for="url">MP3 URL</label>
|
||||||
<input class="txt" type="text" name="url" id="url" value="{editUrl}" size="80" />
|
<input class="txt" type="text" name="url" id="url" value="{editUrl}" size="80" />
|
||||||
<div style="color: rgb(136, 136, 136); margin-bottom: 5px; font-size: 11px; font-weight: bold;">
|
<div style="color: rgb(136, 136, 136); margin-bottom: 5px; font-size: 11px; font-weight: bold;">
|
||||||
This is the MP3 file URL or a GoEar URL.<br>
|
This is the MP3 file URL or a GoEar URL or Odeo URL.<br>
|
||||||
<span style="font-size: 10px; font-weight: normal;">(ie. http://www.goear.com/listen.php?v=c0a2c85)</span>
|
<span style="font-size: 10px; font-weight: normal;">(ie. http://www.goear.com/listen.php?v=c0a2c85)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,8 @@ if(!defined('entry') || !entry) die('Not a valid page');
|
||||||
}
|
}
|
||||||
} elseif (isGoEar($remoteFileName)) {
|
} elseif (isGoEar($remoteFileName)) {
|
||||||
return true;
|
return true;
|
||||||
|
} elseif (isOdeo($remoteFileName)) {
|
||||||
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -69,6 +71,19 @@ if(!defined('entry') || !entry) die('Not a valid page');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isOdeo($songUrl){
|
||||||
|
if (beginsWith($songUrl, "http://odeo.com/audio/") || beginsWith($songUrl, "http://www.odeo.com/audio/"))
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getOdeoCode($songUrl) {
|
||||||
|
$params = explode("audio/", $songUrl);
|
||||||
|
$params2 = explode("/",$params[1]);
|
||||||
|
return $params2[0];
|
||||||
|
}
|
||||||
|
|
||||||
function isImageFile($photoUrl) {
|
function isImageFile($photoUrl) {
|
||||||
if (endsWith($photoUrl, ".jpg")) { return true; }
|
if (endsWith($photoUrl, ".jpg")) { return true; }
|
||||||
elseif (endsWith($photoUrl, ".gif")) { return true; }
|
elseif (endsWith($photoUrl, ".gif")) { return true; }
|
||||||
|
|
|
||||||
|
|
@ -181,6 +181,8 @@ class gelato extends Conexion_Mysql {
|
||||||
return "\t\t\t<object type=\"application/x-shockwave-flash\" data=\"" . $playerUrl . "\" width=\"290\" height=\"24\"><param name=\"movie\" value=\"" . $playerUrl . "\" /><param name=\"quality\" value=\"high\" /><param name=\"menu\" value=\"false\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
|
return "\t\t\t<object type=\"application/x-shockwave-flash\" data=\"" . $playerUrl . "\" width=\"290\" height=\"24\"><param name=\"movie\" value=\"" . $playerUrl . "\" /><param name=\"quality\" value=\"high\" /><param name=\"menu\" value=\"false\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
|
||||||
} elseif (isGoEar($url)) {
|
} elseif (isGoEar($url)) {
|
||||||
return "\t\t\t<object type=\"application/x-shockwave-flash\" data=\"http://www.goear.com/files/localplayer.swf\" width=\"366\" height=\"75\"><param name=\"movie\" value=\"http://www.goear.com/files/localautoplayer.swf\" /><param name=\"quality\" value=\"high\" /><param name=\"FlashVars\" value=\"file=".getGoEarCode($url)."\" /></object>\n";
|
return "\t\t\t<object type=\"application/x-shockwave-flash\" data=\"http://www.goear.com/files/localplayer.swf\" width=\"366\" height=\"75\"><param name=\"movie\" value=\"http://www.goear.com/files/localautoplayer.swf\" /><param name=\"quality\" value=\"high\" /><param name=\"FlashVars\" value=\"file=".getGoEarCode($url)."\" /></object>\n";
|
||||||
|
} elseif (isOdeo($url)) {
|
||||||
|
return "\t\t\t<object type=\"application/x-shockwave-flash\" data=\"http://media.odeo.com/flash/odeo_player.swf?v=3\" width=\"366\" height=\"75\"><param name=\"quality\" value=\"high\" /><param name=\"FlashVars\" value=\"type=audio&id=".getOdeoCode($url)."\" /><param name=\"wmode\" value=\"transparent\" /></object></object>\n";
|
||||||
} else {
|
} else {
|
||||||
return "This URL is not an MP3 file.";
|
return "This URL is not an MP3 file.";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue