Displaying videos directly from link from symfony cast website without downloading.
This commit is contained in:
@@ -7,6 +7,7 @@ use App\Models\Chapter;
|
||||
use App\Models\Course;
|
||||
use GuzzleHttp\TransferStats;
|
||||
use GuzzleHttp\Client;
|
||||
use JetBrains\PhpStorm\NoReturn;
|
||||
|
||||
class SymfonyCastDlService
|
||||
{
|
||||
@@ -46,6 +47,13 @@ class SymfonyCastDlService
|
||||
}
|
||||
}
|
||||
|
||||
public function getChapterInfo(Chapter $chapter): string
|
||||
{
|
||||
$course = $chapter->course;
|
||||
$chapterPage = $this->client->get('/screencast/' . $course->link . DIRECTORY_SEPARATOR . $chapter->link);
|
||||
return $this->htmlParser->getVideoSource($chapterPage);
|
||||
}
|
||||
|
||||
public function videoSize(Chapter $chapter): Chapter
|
||||
{
|
||||
if (!$chapter->video_size) {
|
||||
|
||||
Reference in New Issue
Block a user