koel/app/Services/Streamers/S3Streamer.php

17 lines
395 B
PHP
Raw Normal View History

2016-06-13 09:04:42 +00:00
<?php
2017-04-20 11:20:32 +00:00
namespace App\Services\Streamers;
2016-06-13 09:04:42 +00:00
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
}
}