]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix HTTP fallback when having videostream issues on firefox
authorChocobozzz <me@florianbigard.com>
Wed, 20 Jun 2018 06:57:52 +0000 (08:57 +0200)
committerChocobozzz <me@florianbigard.com>
Wed, 20 Jun 2018 06:57:52 +0000 (08:57 +0200)
client/src/app/videos/+video-edit/shared/video-edit.component.ts
client/src/assets/player/video-renderer.ts
server/helpers/custom-validators/activitypub/actor.ts

index 35d406ee3371813cdacd34ce9f6b157ca54faf53..66eb6611a78096869805da41574ba0748a335953 100644 (file)
@@ -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
   }
index 4affb43cf1c951aa87cf23c3d246c971b83a9d7d..2cb05a4482b821966b439cf27e341b381c3070b3 100644 (file)
@@ -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)
index 9a0bb32c16bd753d5c142e388fcba8ab8d19d3b3..c7a64e24d5468daaf11985409cf5a2eb4c861da8 100644 (file)
@@ -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