mirror of
https://github.com/koel/koel
synced 2024-11-28 15:00:42 +00:00
23 lines
506 B
PHP
23 lines
506 B
PHP
<?php
|
|
|
|
namespace App\Http\Streamers;
|
|
|
|
use App\Models\Song;
|
|
|
|
class S3Streamer extends Streamer implements StreamerInterface
|
|
{
|
|
public function __construct(Song $song)
|
|
{
|
|
parent::__construct($song);
|
|
}
|
|
|
|
/**
|
|
* Stream the current song through S3.
|
|
* Actually, we only redirect to the S3 object's location.
|
|
*/
|
|
public function stream()
|
|
{
|
|
// Get and redirect to the actual presigned-url
|
|
return redirect($this->song->getObjectStoragePublicUrl());
|
|
}
|
|
}
|