X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fapp%2Fvideos%2Fvideo-watch%2Fvideo-watch.component.ts;h=f5a47199d197030ab0a72390ae8be9453311a481;hb=bfb3a98fac582f104c6d9b8b7242ea2cbb650b91;hp=cd11aa33c508f0fb4e198509fc5ab1c8aff09173;hpb=0c31c33dcb0baaa8d3aeedb63336dfe2ae6e5585;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/videos/video-watch/video-watch.component.ts b/client/src/app/videos/video-watch/video-watch.component.ts index cd11aa33c..f5a47199d 100644 --- a/client/src/app/videos/video-watch/video-watch.component.ts +++ b/client/src/app/videos/video-watch/video-watch.component.ts @@ -90,8 +90,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy { window.clearInterval(this.torrentInfosInterval) window.clearTimeout(this.errorTimer) - if (this.video !== null && this.webTorrentService.has(this.video.magnetUri)) { - this.webTorrentService.remove(this.video.magnetUri) + if (this.video !== null && this.webTorrentService.has(this.video.getDefaultMagnetUri())) { + this.webTorrentService.remove(this.video.getDefaultMagnetUri()) } // Remove player @@ -108,13 +108,13 @@ export class VideoWatchComponent implements OnInit, OnDestroy { // We are loading the video this.loading = true - console.log('Adding ' + this.video.magnetUri + '.') + console.log('Adding ' + this.video.getDefaultMagnetUri() + '.') // The callback might never return if there are network issues // So we create a timer to inform the user the load is abnormally long this.errorTimer = window.setTimeout(() => this.loadTooLong(), VideoWatchComponent.LOADTIME_TOO_LONG) - const torrent = this.webTorrentService.add(this.video.magnetUri, torrent => { + const torrent = this.webTorrentService.add(this.video.getDefaultMagnetUri(), torrent => { // Clear the error timer window.clearTimeout(this.errorTimer) // Maybe the error was fired by the timer, so reset it @@ -123,7 +123,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { // We are not loading the video anymore this.loading = false - console.log('Added ' + this.video.magnetUri + '.') + console.log('Added ' + this.video.getDefaultMagnetUri() + '.') torrent.files[0].renderTo(this.playerElement, (err) => { if (err) { this.notificationsService.error('Error', 'Cannot append the file in the video element.') @@ -158,7 +158,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { this.userRating = 'like' }, - err => this.notificationsService.error('Error', err.text) + err => this.notificationsService.error('Error', err.message) ) } @@ -175,7 +175,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { this.userRating = 'dislike' }, - err => this.notificationsService.error('Error', err.text) + err => this.notificationsService.error('Error', err.message) ) } @@ -275,7 +275,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { } }, - err => this.notificationsService.error('Error', err.text) + err => this.notificationsService.error('Error', err.message) ) }