Fixed on errors

Change-Id: I4868fbd6819d70c120b16250d13d7aca377ff06e
Signed-off-by: smarcet <smarcet@gmail.com>
This commit is contained in:
smarcet 2021-06-08 15:55:26 -03:00
parent 64f529cb8e
commit 3395ac763d
2 changed files with 30 additions and 22 deletions

View File

@ -49,7 +49,7 @@ class MUXExportExcerptMail extends Mailable
{
$this->mail_to = $mail_to;
$this->step = $step;
$this->excerpt = $excerpt;
$this->excerpt = nl2br($excerpt);
}
public function build()

View File

@ -247,21 +247,27 @@ final class PresentationVideoMediaUploadProcessor
{
if (!is_null($this->assets_api)) return;
// Authentication Setup
$config = MuxConfig::getDefaultConfiguration()
->setUsername($credentials->getTokenId())
->setPassword($credentials->getTokenSecret());
try {
// Authentication Setup
$config = MuxConfig::getDefaultConfiguration()
->setUsername($credentials->getTokenId())
->setPassword($credentials->getTokenSecret());
// API Client Initialization
$this->assets_api = new MuxAssetApi(
new GuzzleHttpClient,
$config
);
// API Client Initialization
$this->assets_api = new MuxAssetApi(
new GuzzleHttpClient,
$config
);
$this->playback_api = new MuxPlaybackIDApi(
new GuzzleHttpClient,
$config
);
$this->playback_api = new MuxPlaybackIDApi(
new GuzzleHttpClient,
$config
);
}
catch (\Exception $ex){
Log::error($ex);
throw $ex;
}
}
/**
@ -352,14 +358,16 @@ final class PresentationVideoMediaUploadProcessor
if (!empty($mail_to))
Mail::queue(new MUXExportExcerptMail($mail_to, "MUX Assets MP4 Enabling Process", $excerpt));
// fire exporting
// @see https://docs.mux.com/guides/video/download-your-videos#download-videos
CreateVideosFromMUXAssetsForSummitJob::dispatch(
$summit_id,
$credentials->getTokenId(),
$credentials->getTokenSecret(),
$mail_to
)->delay(now()->addMinutes(30));
if(count($event_ids) > 0) {
// fire exporting
// @see https://docs.mux.com/guides/video/download-your-videos#download-videos
CreateVideosFromMUXAssetsForSummitJob::dispatch(
$summit_id,
$credentials->getTokenId(),
$credentials->getTokenSecret(),
$mail_to
)->delay(now()->addMinutes(30));
}
return count($event_ids);
}