Skip to content

Commit

Permalink
Add Uppy Config
Browse files Browse the repository at this point in the history
  • Loading branch information
PHPJunior committed Aug 17, 2021
1 parent 243de5c commit ac8174c
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/Http/Livewire/Frontend/Channel/LiveProducer.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function mount()
$this->description = $this->video->description;
$this->start = $this->video->extra_attributes->get('go_live');
$this->stream_key = $this->video->extra_attributes->get('stream_key');
$this->server_url = config("RTMP.SERVER_URL");
$this->server_url = config('rtmp.server_url');
}

public function startLive($value)
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Channel/Video.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public function scopeWithExtraAttributes(): Builder

public function getVideoSourceAttribute()
{
return $this->type == 'upload' ? Storage::disk($this->disk)->url($this->streaming_url) : config('RTMP.HOST') . $this->streaming_url;
return $this->type == 'upload' ? Storage::disk($this->disk)->url($this->streaming_url) : config('rtmp.host') . $this->streaming_url;
}
}
8 changes: 0 additions & 8 deletions config/RTMP.php

This file was deleted.

8 changes: 8 additions & 0 deletions config/rtmp.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

return [

'server_url' => env('RTMP_SERVER_URL'),

'host' => env('RTMP_HOST'),
];
5 changes: 5 additions & 0 deletions config/uppy.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

return [
'companion_url' => env('UPPY_COMPANION_URL')
];
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
});
uppy.use(Uppy.Url, {
target: Uppy.Dashboard,
companionUrl: '{{ env('UPPY_COMPANION_URL') }}',
companionUrl: '{{ config('uppy.companion_url') }}',
});
uppy.use(Uppy.Webcam, { target: Uppy.Dashboard, onBeforeSnapshot: () => Promise.resolve(), preferredVideoMimeType: 'video/webm' });
uppy.use(Uppy.ScreenCapture, { target: Uppy.Dashboard })
uppy.use(Uppy.Tus, {
endpoint: '{{ env('APP_URL') }}/tus',
endpoint: '{{ config('app.url') }}/tus',
resume: false,
autoRetry: true,
chunkSize: 2000000,
Expand Down

0 comments on commit ac8174c

Please sign in to comment.