From 575712a5c970ea1edeb6b44a35a095fc08193a3d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 20 Jun 2018 08:57:52 +0200 Subject: [PATCH] Fix HTTP fallback when having videostream issues on firefox --- .../src/app/videos/+video-edit/shared/video-edit.component.ts | 1 - client/src/assets/player/video-renderer.ts | 4 ++-- server/helpers/custom-validators/activitypub/actor.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.ts b/client/src/app/videos/+video-edit/shared/video-edit.component.ts index 35d406ee3..66eb6611a 100644 --- a/client/src/app/videos/+video-edit/shared/video-edit.component.ts +++ b/client/src/app/videos/+video-edit/shared/video-edit.component.ts @@ -101,7 +101,6 @@ export class VideoEditComponent implements OnInit { this.videoCategories = this.serverService.getVideoCategories() this.videoLicences = this.serverService.getVideoLicences() this.videoLanguages = this.serverService.getVideoLanguages() - console.log(this.videoLanguages) setTimeout(() => this.minScheduledDate = new Date(), 1000 * 60) // Update every minute } diff --git a/client/src/assets/player/video-renderer.ts b/client/src/assets/player/video-renderer.ts index 4affb43cf..2cb05a448 100644 --- a/client/src/assets/player/video-renderer.ts +++ b/client/src/assets/player/video-renderer.ts @@ -45,10 +45,10 @@ function renderMedia (file, elem: HTMLVideoElement, opts: RenderMediaOptions, ca function useVideostream () { prepareElem() - preparedElem.addEventListener('error', function onError () { + preparedElem.addEventListener('error', function onError (err) { preparedElem.removeEventListener('error', onError) - return fallbackToMediaSource() + return callback(err) }) preparedElem.addEventListener('loadstart', onLoadStart) return videostream(file, preparedElem) diff --git a/server/helpers/custom-validators/activitypub/actor.ts b/server/helpers/custom-validators/activitypub/actor.ts index 9a0bb32c1..c7a64e24d 100644 --- a/server/helpers/custom-validators/activitypub/actor.ts +++ b/server/helpers/custom-validators/activitypub/actor.ts @@ -92,7 +92,7 @@ function isActorUpdateActivityValid (activity: any) { } function normalizeActor (actor: any) { - if (!actor) return + if (!actor || !actor.url) return if (typeof actor.url !== 'string') { actor.url = actor.url.href || actor.url.url -- 2.25.1