Hash system and controls inside player
This commit is contained in:
parent
c8d991883a
commit
e9b194217a
8 changed files with 151 additions and 71 deletions
22
index.php
22
index.php
|
|
@ -9,7 +9,17 @@ $app->get('/', function () use ($app) {
|
|||
$app->response()->page('./views/home.html');
|
||||
});
|
||||
|
||||
$app->get("/users/{user}", function (string $username) {
|
||||
$app->get('/stream', function () {
|
||||
if (!isset($_GET['url'])) {
|
||||
die('You need to send a url!');
|
||||
}
|
||||
|
||||
// Start streamer
|
||||
$streamer = new \Sovit\TikTok\Stream();
|
||||
$streamer->stream($_GET['url']);
|
||||
});
|
||||
|
||||
$app->get("/@([^/]+)", function (string $username) {
|
||||
$cursor = 0;
|
||||
if (isset($_GET['cursor']) && is_numeric($_GET['cursor'])) {
|
||||
$cursor = (int) $_GET['cursor'];
|
||||
|
|
@ -24,14 +34,4 @@ $app->get("/users/{user}", function (string $username) {
|
|||
}
|
||||
});
|
||||
|
||||
$app->get('/stream', function () {
|
||||
if (!isset($_GET['url'])) {
|
||||
die('You need to send a url!');
|
||||
}
|
||||
|
||||
// Start streamer
|
||||
$streamer = new \Sovit\TikTok\Stream();
|
||||
$streamer->stream($_GET['url']);
|
||||
});
|
||||
|
||||
$app->run();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue