koel/app/Http/Streamers/S3Streamer.php

17 lines
391 B
PHP
Raw Normal View History

2016-06-13 09:04:42 +00:00
<?php
namespace App\Http\Streamers;
class S3Streamer extends Streamer implements StreamerInterface
{
/**
* Stream the current song through S3.
* Actually, we only redirect to the S3 object's location.
*/
2016-07-11 07:26:39 +00:00
public function stream()
2016-06-13 09:04:42 +00:00
{
// Get and redirect to the actual presigned-url
2016-07-11 07:26:39 +00:00
return redirect($this->song->getObjectStoragePublicUrl());
2016-06-13 09:04:42 +00:00
}
}