1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-22 03:32:47 +08:00
2020-08-03 20:47:35 +08:00

30 lines
638 B
PHP

<?php
namespace App\Services\Frontend\Teaching;
use App\Services\Frontend\Chapter\ChapterLiveTrait;
use App\Services\Frontend\ChapterTrait;
use App\Services\Frontend\Service as FrontendService;
use App\Services\Live as LiveService;
class LivePushUrl extends FrontendService
{
use ChapterTrait;
use ChapterLiveTrait;
public function handle()
{
$chapterId = $this->request->getQuery('chapter_id');
$chapter = $this->checkChapter($chapterId);
$service = new LiveService();
$steamName = $this->getLiveStreamName($chapter->id);
return $service->getPushUrl($steamName);
}
}