Commit 092e10a9 authored by Brian Hatchet's avatar Brian Hatchet :speech_balloon: Committed by Mark Harding

(fix) Better transcoding error message

If the direct source video fails to play, it calls the fallback.
The fallback calls the transcoding endpoint which verifies that there is a source file.
If the source file has been deleted, it will return a "This video has been deleted..." error.
It will also return the list of transcodes in the response.

This goes with this backend MR engine!194
parent 87870a29
No related merge requests found
Pipeline #65916301 (#493) canceled with stages
in 18 seconds
......@@ -37,6 +37,10 @@
<span i18n="@@MEDIA__VIDEO__TRANSCODING_NOTICE">The video is being transcoded</span>
</div>
<div *ngIf="transcodingError" class="minds-video-bar-top">
<span i18n="@@MEDIA__VIDEO__TRANSCODING_NOTICE">{{transcodingError}}</span>
</div>
<div class="minds-video-bar-full">
<i class="material-icons" *ngIf="!playerRef.isLoading(); else loadingSpinner"
(click)="playerRef.toggle()"
......
......@@ -63,6 +63,7 @@ export class MindsVideoComponent {
private availableQualities: string[] = [];
private currentQuality: string = '';
transcodingError = null;
constructor(
public scroll: ScrollService,
......@@ -231,7 +232,10 @@ export class MindsVideoComponent {
if (!success) {
let response: any = await this.client.get(`api/v1/media/transcoding/${this.guid}`);
this.transcoding = true || response.transcoding; // TODO: Handle this correctly
this.transcoding = response.transcoding;
if (response.error) {
this.transcodingError = response.error;
}
}
this.detectChanges();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment