aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-20 08:57:52 +0200
committerChocobozzz <me@florianbigard.com>2018-06-20 08:57:52 +0200
commit575712a5c970ea1edeb6b44a35a095fc08193a3d (patch)
treebc19ed8f75667ae31a7858d786123d9391ec1cb6
parent9c2e0dbfa9098675390e00ccb0fa49c51b3c6732 (diff)
downloadPeerTube-575712a5c970ea1edeb6b44a35a095fc08193a3d.tar.gz
PeerTube-575712a5c970ea1edeb6b44a35a095fc08193a3d.tar.zst
PeerTube-575712a5c970ea1edeb6b44a35a095fc08193a3d.zip
Fix HTTP fallback when having videostream issues on firefox
-rw-r--r--client/src/app/videos/+video-edit/shared/video-edit.component.ts1
-rw-r--r--client/src/assets/player/video-renderer.ts4
-rw-r--r--server/helpers/custom-validators/activitypub/actor.ts2
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 {
101 this.videoCategories = this.serverService.getVideoCategories() 101 this.videoCategories = this.serverService.getVideoCategories()
102 this.videoLicences = this.serverService.getVideoLicences() 102 this.videoLicences = this.serverService.getVideoLicences()
103 this.videoLanguages = this.serverService.getVideoLanguages() 103 this.videoLanguages = this.serverService.getVideoLanguages()
104 console.log(this.videoLanguages)
105 104
106 setTimeout(() => this.minScheduledDate = new Date(), 1000 * 60) // Update every minute 105 setTimeout(() => this.minScheduledDate = new Date(), 1000 * 60) // Update every minute
107 } 106 }
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
45 45
46 function useVideostream () { 46 function useVideostream () {
47 prepareElem() 47 prepareElem()
48 preparedElem.addEventListener('error', function onError () { 48 preparedElem.addEventListener('error', function onError (err) {
49 preparedElem.removeEventListener('error', onError) 49 preparedElem.removeEventListener('error', onError)
50 50
51 return fallbackToMediaSource() 51 return callback(err)
52 }) 52 })
53 preparedElem.addEventListener('loadstart', onLoadStart) 53 preparedElem.addEventListener('loadstart', onLoadStart)
54 return videostream(file, preparedElem) 54 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) {
92} 92}
93 93
94function normalizeActor (actor: any) { 94function normalizeActor (actor: any) {
95 if (!actor) return 95 if (!actor || !actor.url) return
96 96
97 if (typeof actor.url !== 'string') { 97 if (typeof actor.url !== 'string') {
98 actor.url = actor.url.href || actor.url.url 98 actor.url = actor.url.href || actor.url.url