if (err) return handleError(err)
this.renderer = renderer
- player.play()
-
- return done()
+ player.play().then(done)
})
})
player.updateVideoFile()
} else {
player.one('play', () => {
- // Pause, we wait the video to load before
- player.pause()
-
- player.updateVideoFile(undefined, () => player.play())
+ // On firefox, we need to wait to load the video before playing
+ if (navigator.userAgent.toLowerCase().indexOf('firefox') !== -1) {
+ player.pause()
+ player.updateVideoFile(undefined, () => player.play())
+ return
+ }
+
+ player.updateVideoFile(undefined)
})
}
}
function isVideoTorrentObjectValid (video: any) {
- console.log(video)
-
return video.type === 'Video' &&
isActivityPubUrlValid(video.id) &&
isVideoNameValid(video.name) &&
return sendAccept(actorFollow, t)
})
- logger.info('Actor %s is followed by actor %s.', actor.url, targetActorURL)
+ logger.info('Actor %s is followed by actor %s.', targetActorURL, actor.url)
}
function executeIfActivityPub (fun: RequestHandler | RequestHandler[]) {
return (req: Request, res: Response, next: NextFunction) => {
const accepted = req.accepts(ACCEPT_HEADERS)
- console.log(accepted)
if (accepted === false || ACTIVITY_PUB.POTENTIAL_ACCEPT_HEADERS.indexOf(accepted) === -1) {
return next()
}