src/Biz/OpenCourse/Service/Impl/LiveCourseServiceImpl.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Biz\OpenCourse\Service\Impl;
use AppBundle\Common\ArrayToolkit;
use Biz\Activity\LiveActivityException;
use Biz\BaseService;
use Biz\OpenCourse\OpenCourseException;
use Biz\OpenCourse\Service\LiveCourseService;
use Biz\User\UserException;
use Biz\System\Service\SettingService;
use Biz\Util\EdusohoLiveClient;
use Topxia\Service\Common\ServiceKernel;
class LiveCourseServiceImpl extends BaseService implements LiveCourseService
{
const LIVE_STARTTIME_DIFF_SECONDS = 7200;
const LIVE_ENDTIME_DIFF_SECONDS = 7200;
private $liveClient = null;
public function createLiveRoom($course, $lesson, $routes)
{
$liveParams = $this->_filterParams($course['teacherIds'], $lesson, $routes, 'add');
$live = $this->createLiveClient()->createLive($liveParams);
if (empty($live)) {
$this->createNewException(LiveActivityException::CREATE_LIVEROOM_FAILED());
}
if (isset($live['error'])) {
throw $this->createServiceException($live['error']);
}
return $live;
}
public function editLiveRoom($course, $lesson, $routes)
{
$liveParams = $this->_filterParams($course['teacherIds'], $lesson, $routes, 'update');
return $this->createLiveClient()->updateLive($liveParams);
}
public function entryLive($params)
{
return $this->createLiveClient()->entryLive($params);
}
public function checkLessonStatus($lesson)
{
if (empty($lesson)) {
return array('result' => false, 'message' => '课时不存在!');
}
if (empty($lesson['mediaId'])) {
return array('result' => false, 'message' => '直播教室不存在!');
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。