mirror of
https://github.com/koel/koel
synced 2024-12-22 10:33:16 +00:00
21 lines
498 B
PHP
21 lines
498 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Services\Streamer\Adapters;
|
||
|
|
||
|
use App\Models\Song;
|
||
|
use App\Services\SongStorages\DropboxStorage;
|
||
|
use Illuminate\Http\RedirectResponse;
|
||
|
use Illuminate\Routing\Redirector;
|
||
|
|
||
|
class DropboxStreamerAdapter implements StreamerAdapter
|
||
|
{
|
||
|
public function __construct(private DropboxStorage $storage)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public function stream(Song $song, array $config = []): Redirector|RedirectResponse
|
||
|
{
|
||
|
return redirect($this->storage->getSongPresignedUrl($song));
|
||
|
}
|
||
|
}
|