Small fix
This commit is contained in:
parent
fe3ae82100
commit
321ce20007
|
@ -4,7 +4,7 @@
|
|||
"version": "1.0.0",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"require": {
|
||||
"php": "^8.0",
|
||||
"php": "^7.3|^8.0",
|
||||
"ext-curl": "*",
|
||||
"ssovit/tiktok-api": "^2.0",
|
||||
"steampixel/simple-php-router": "^0.7.0",
|
||||
|
|
6
composer.lock
generated
6
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "e3448e649bcb2f2456c630905ae887fd",
|
||||
"content-hash": "e064040cff1f97fef9172828540a1aac",
|
||||
"packages": [
|
||||
{
|
||||
"name": "graham-campbell/result-type",
|
||||
|
@ -642,9 +642,9 @@
|
|||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": "^8.0.0",
|
||||
"php": "^7.3|^8.0",
|
||||
"ext-curl": "*"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.2.0"
|
||||
"plugin-api-version": "2.0.0"
|
||||
}
|
||||
|
|
|
@ -52,9 +52,12 @@ Route::add('/stream', function () use ($domains) {
|
|||
}
|
||||
|
||||
if (isset($_GET['download'])) {
|
||||
header('Content-Disposition: attachment; filename="tiktok.mp4"');
|
||||
// Download
|
||||
$downloader = new \Sovit\TikTok\Download();
|
||||
$downloader->url($url,"tiktok-video",'mp4');
|
||||
} else {
|
||||
// Stream
|
||||
$streamer = new \Sovit\TikTok\Stream();
|
||||
$streamer->stream($url);
|
||||
}
|
||||
|
||||
$streamer = new \Sovit\TikTok\Stream();
|
||||
$streamer->stream($url);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue