PHP Class App\Http\Controllers\API\SongController

Inheritance: extends Controller
Show file Open project: phanan/koel

Public Methods

Method Description
play ( Song $song, null | boolean $transcode = null, null | integer $bitRate = null ) : Illuminate\Http\RedirectResponse | Redirector Play/stream a song.
show ( Song $song ) : Illuminate\Http\JsonResponse Get extra information about a song via Last.fm.
update ( SongUpdateRequest $request ) : Illuminate\Http\JsonResponse Update songs info.

Method Details

play() public method

Play/stream a song.
public play ( Song $song, null | boolean $transcode = null, null | integer $bitRate = null ) : Illuminate\Http\RedirectResponse | Redirector
$song app\models\Song The song to stream.
$transcode null | boolean Whether to force transcoding the song. If this is omitted, by default Koel will transcode FLAC.
$bitRate null | integer The target bit rate to transcode, defaults to OUTPUT_BIT_RATE. Only taken into account if $transcode is truthy.
return Illuminate\Http\RedirectResponse | Illuminate\Routing\Redirector

show() public method

Get extra information about a song via Last.fm.
public show ( Song $song ) : Illuminate\Http\JsonResponse
$song app\models\Song
return Illuminate\Http\JsonResponse

update() public method

Update songs info.
public update ( SongUpdateRequest $request ) : Illuminate\Http\JsonResponse
$request App\Http\Requests\API\SongUpdateRequest
return Illuminate\Http\JsonResponse