Hash system and controls inside player

This commit is contained in:
Pablo Ferreiro 2022-01-02 00:06:00 +01:00
parent c8d991883a
commit e9b194217a
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
8 changed files with 151 additions and 71 deletions

View file

@ -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();