Fix HTTP fallback when having videostream issues on firefox

pull/691/head
Chocobozzz 2018-06-20 08:57:52 +02:00
parent 9c2e0dbfa9
commit 575712a5c9
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 3 additions and 4 deletions

View 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
}

View 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)

View 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