From: Chocobozzz Date: Wed, 20 Jun 2018 06:57:52 +0000 (+0200) Subject: Fix HTTP fallback when having videostream issues on firefox X-Git-Tag: v1.0.0-beta.9~19 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=575712a5c970ea1edeb6b44a35a095fc08193a3d;hp=9c2e0dbfa9098675390e00ccb0fa49c51b3c6732;p=github%2FChocobozzz%2FPeerTube.git Fix HTTP fallback when having videostream issues on firefox --- 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