本文整理匯總了PHP中BaseObject::setStreamName方法的典型用法代碼示例。如果您正苦於以下問題:PHP BaseObject::setStreamName方法的具體用法?PHP BaseObject::setStreamName怎麽用?PHP BaseObject::setStreamName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BaseObject
的用法示例。
在下文中一共展示了BaseObject::setStreamName方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: objectCreated
public function objectCreated(BaseObject $object)
{
/* @var $object entry */
$partner = $object->getPartner();
$velocixLiveParamsJSON = json_decode($partner->getLiveStreamProvisionParams());
if (!isset($velocixLiveParamsJSON->velocix) || !isset($velocixLiveParamsJSON->velocix->userName) || !isset($velocixLiveParamsJSON->velocix->password)) {
$object->setStatus(entryStatus::ERROR_IMPORTING);
$object->save();
return true;
}
if (isset($velocixLiveParamsJSON->velocix->streamNamePrefix)) {
$object->setStreamName($velocixLiveParamsJSON->velocix->streamNamePrefix . '_' . $object->getId());
} else {
$object->setStreamName($object->getId());
}
$object->save();
return true;
}
示例2: objectCreated
public function objectCreated(BaseObject $object)
{
/* @var $object entry */
$partner = $object->getPartner();
$limeLightLiveParamsJSON = $partner->getLiveStreamProvisionParams();
$limeLightLiveParams = json_decode($limeLightLiveParamsJSON);
if (!isset($limeLightLiveParams->Limelight) || !isset($limeLightLiveParams->Limelight->limelightPrimaryPublishUrl) || !isset($limeLightLiveParams->Limelight->limelightSecondaryPublishUrl) || !isset($limeLightLiveParams->Limelight->limelightStreamUrl)) {
$object->setStatus(entryStatus::ERROR_IMPORTING);
$object->save();
return true;
}
$object->setPrimaryBroadcastingUrl($limeLightLiveParams->Limelight->limelightPrimaryPublishUrl);
$object->setSecondaryBroadcastingUrl($limeLightLiveParams->Limelight->limelightSecondaryPublishUrl);
$object->setStreamUrl($limeLightLiveParams->Limelight->limelightStreamUrl);
$object->setStreamName($object->getId() . '_%i');
$object->setStatus(entryStatus::READY);
$object->save();
return true;
}