Show transcoding fail error to admin

pull/221/head
Varun Patil 2022-11-11 18:20:48 -08:00
parent 801902e5c6
commit 2ed0182a77
1 changed files with 8 additions and 0 deletions

View File

@ -2,6 +2,9 @@ import PhotoSwipe from "photoswipe";
import { generateUrl } from "@nextcloud/router"; import { generateUrl } from "@nextcloud/router";
import { loadState } from "@nextcloud/initial-state"; import { loadState } from "@nextcloud/initial-state";
import axios from "@nextcloud/axios"; import axios from "@nextcloud/axios";
import { showError } from "@nextcloud/dialogs";
import { translate as t } from "@nextcloud/l10n";
import { getCurrentUser } from "@nextcloud/auth";
import videojs from "video.js"; import videojs from "video.js";
import "video.js/dist/video-js.min.css"; import "video.js/dist/video-js.min.css";
@ -197,6 +200,11 @@ class VideoContentSetup {
if (content.videojs.src().includes("m3u8")) { if (content.videojs.src().includes("m3u8")) {
// HLS could not be streamed // HLS could not be streamed
console.error("Video.js: HLS stream could not be opened."); console.error("Video.js: HLS stream could not be opened.");
if (getCurrentUser()?.isAdmin) {
showError(t("memories", "Transcoding failed."));
}
content.videojs.src({ content.videojs.src({
src: content.data.src, src: content.data.src,
}); });