本文整理匯總了PHP中Stream::setAverageFps方法的典型用法代碼示例。如果您正苦於以下問題:PHP Stream::setAverageFps方法的具體用法?PHP Stream::setAverageFps怎麽用?PHP Stream::setAverageFps使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Stream
的用法示例。
在下文中一共展示了Stream::setAverageFps方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: streamFromData
private function streamFromData($data)
{
$stream = new Stream();
$stream->setService('twitch');
$stream->setViewers($data->viewers);
$stream->setQuality($data->video_height);
$stream->setAverageFps($data->average_fps);
$stream->setPreviewImage($data->preview->large);
//$this->previewImageTemplate = $object->preview->template;
if (isset($data->channel->broadcaster_language)) {
$stream->setBroadcasterLanguage($data->channel->broadcaster_language);
$stream->setLanguage($data->channel->language);
$stream->setStatus($data->channel->status);
$stream->setName($data->channel->display_name);
$stream->setLink('http://www.twitch.tv/' . $data->channel->display_name);
}
return $stream;
}