#1226 New optional parameter length added to the GreenBox::addAudioClipToPlaylist() method.
This commit is contained in:
parent
eee7429d48
commit
a45ae563bb
2 changed files with 12 additions and 6 deletions
|
@ -500,12 +500,14 @@ class GreenBox extends BasicStor{
|
||||||
* @param sessid string, session ID
|
* @param sessid string, session ID
|
||||||
* @param fadeIn string, optional, in time format hh:mm:ss.ssssss
|
* @param fadeIn string, optional, in time format hh:mm:ss.ssssss
|
||||||
* @param fadeOut string, dtto
|
* @param fadeOut string, dtto
|
||||||
|
* @param length string - optional length in extent format -
|
||||||
|
* for webstream (or for overrule length of audioclip)
|
||||||
* @param pause string, optional - pause between half-faded points
|
* @param pause string, optional - pause between half-faded points
|
||||||
* in time format hh:mm:ss.ssssss
|
* in time format hh:mm:ss.ssssss
|
||||||
* @return string, generated playlistElement gunid
|
* @return string, generated playlistElement gunid
|
||||||
*/
|
*/
|
||||||
function addAudioClipToPlaylist($token, $acId, $sessid,
|
function addAudioClipToPlaylist($token, $acId, $sessid,
|
||||||
$fadeIn=NULL, $fadeOut=NULL, $pause=NULL)
|
$fadeIn=NULL, $fadeOut=NULL, $length=NULL, $pause=NULL)
|
||||||
{
|
{
|
||||||
require_once"Playlist.php";
|
require_once"Playlist.php";
|
||||||
$pl =& Playlist::recallByToken($this, $token);
|
$pl =& Playlist::recallByToken($this, $token);
|
||||||
|
@ -525,11 +527,11 @@ class GreenBox extends BasicStor{
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
# $res = $pl->addAudioClip($acId, $fadeIn, $fadeOut, NULL, $pause);
|
// $res = $pl->addAudioClip($acId, $fadeIn, $fadeOut, NULL, $pause);
|
||||||
$res = $pl->addAudioClip($acId, $fadeIn, $fadeOut, NULL);
|
$res = $pl->addAudioClip($acId, $fadeIn, $fadeOut, NULL, $length);
|
||||||
if(PEAR::isError($res)) return $res;
|
if(PEAR::isError($res)) return $res;
|
||||||
// recalculate offsets and total length:
|
// recalculate offsets and total length:
|
||||||
# $r = $pl->recalculateTimes($pause);
|
// $r = $pl->recalculateTimes($pause);
|
||||||
$r = $pl->recalculateTimes();
|
$r = $pl->recalculateTimes();
|
||||||
if(PEAR::isError($r)){ return $r; }
|
if(PEAR::isError($r)){ return $r; }
|
||||||
return $res;
|
return $res;
|
||||||
|
|
|
@ -164,7 +164,7 @@ class Playlist extends StoredFile{
|
||||||
* @param parid int - parent record id
|
* @param parid int - parent record id
|
||||||
* @param offset string - relative offset in extent format
|
* @param offset string - relative offset in extent format
|
||||||
* @param acGunid string - audioClip gunid
|
* @param acGunid string - audioClip gunid
|
||||||
* @param acLen string - audiClip length in extent format
|
* @param acLen string - audioClip length in extent format
|
||||||
* @param acTit string - audioClip title
|
* @param acTit string - audioClip title
|
||||||
* @param fadeIn string - fadeIn value in ss.ssssss or extent format
|
* @param fadeIn string - fadeIn value in ss.ssssss or extent format
|
||||||
* @param fadeOut string - fadeOut value in ss.ssssss or extent format
|
* @param fadeOut string - fadeOut value in ss.ssssss or extent format
|
||||||
|
@ -296,15 +296,19 @@ class Playlist extends StoredFile{
|
||||||
* @param fadeIn string, optional, in time format hh:mm:ss.ssssss
|
* @param fadeIn string, optional, in time format hh:mm:ss.ssssss
|
||||||
* @param fadeOut string, dtto
|
* @param fadeOut string, dtto
|
||||||
* @param plElGunid string - optional playlist element gunid
|
* @param plElGunid string - optional playlist element gunid
|
||||||
|
* @param length string - optional length in extent format -
|
||||||
|
* for webstream (or for overrule length of audioclip)
|
||||||
* @return string, generated playlistElement gunid
|
* @return string, generated playlistElement gunid
|
||||||
*/
|
*/
|
||||||
function addAudioClip($acId, $fadeIn=NULL, $fadeOut=NULL, $plElGunid=NULL)
|
function addAudioClip($acId, $fadeIn=NULL, $fadeOut=NULL, $plElGunid=NULL,
|
||||||
|
$length=NULL)
|
||||||
{
|
{
|
||||||
$plGunid = $this->gunid;
|
$plGunid = $this->gunid;
|
||||||
// get information about audioClip
|
// get information about audioClip
|
||||||
$acInfo = $this->getAcInfo($acId);
|
$acInfo = $this->getAcInfo($acId);
|
||||||
if(PEAR::isError($acInfo)){ return $acInfo; }
|
if(PEAR::isError($acInfo)){ return $acInfo; }
|
||||||
extract($acInfo); // 'acGunid', 'acLen', 'acTit', 'elType'
|
extract($acInfo); // 'acGunid', 'acLen', 'acTit', 'elType'
|
||||||
|
if(!is_null($length)) $acLen = $length;
|
||||||
// get information about playlist and containers
|
// get information about playlist and containers
|
||||||
$plInfo = $this->getPlInfo();
|
$plInfo = $this->getPlInfo();
|
||||||
if(PEAR::isError($plInfo)){ return $plInfo; }
|
if(PEAR::isError($plInfo)){ return $plInfo; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue