aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-watch/video-watch.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/video-watch/video-watch.component.ts')
-rw-r--r--client/src/app/videos/video-watch/video-watch.component.ts10
1 files changed, 5 insertions, 5 deletions
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..255757692 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 {
90 window.clearInterval(this.torrentInfosInterval) 90 window.clearInterval(this.torrentInfosInterval)
91 window.clearTimeout(this.errorTimer) 91 window.clearTimeout(this.errorTimer)
92 92
93 if (this.video !== null && this.webTorrentService.has(this.video.magnetUri)) { 93 if (this.video !== null && this.webTorrentService.has(this.video.getDefaultMagnetUri())) {
94 this.webTorrentService.remove(this.video.magnetUri) 94 this.webTorrentService.remove(this.video.getDefaultMagnetUri())
95 } 95 }
96 96
97 // Remove player 97 // Remove player
@@ -108,13 +108,13 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
108 // We are loading the video 108 // We are loading the video
109 this.loading = true 109 this.loading = true
110 110
111 console.log('Adding ' + this.video.magnetUri + '.') 111 console.log('Adding ' + this.video.getDefaultMagnetUri() + '.')
112 112
113 // The callback might never return if there are network issues 113 // The callback might never return if there are network issues
114 // So we create a timer to inform the user the load is abnormally long 114 // So we create a timer to inform the user the load is abnormally long
115 this.errorTimer = window.setTimeout(() => this.loadTooLong(), VideoWatchComponent.LOADTIME_TOO_LONG) 115 this.errorTimer = window.setTimeout(() => this.loadTooLong(), VideoWatchComponent.LOADTIME_TOO_LONG)
116 116
117 const torrent = this.webTorrentService.add(this.video.magnetUri, torrent => { 117 const torrent = this.webTorrentService.add(this.video.getDefaultMagnetUri(), torrent => {
118 // Clear the error timer 118 // Clear the error timer
119 window.clearTimeout(this.errorTimer) 119 window.clearTimeout(this.errorTimer)
120 // Maybe the error was fired by the timer, so reset it 120 // Maybe the error was fired by the timer, so reset it
@@ -123,7 +123,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
123 // We are not loading the video anymore 123 // We are not loading the video anymore
124 this.loading = false 124 this.loading = false
125 125
126 console.log('Added ' + this.video.magnetUri + '.') 126 console.log('Added ' + this.video.getDefaultMagnetUri() + '.')
127 torrent.files[0].renderTo(this.playerElement, (err) => { 127 torrent.files[0].renderTo(this.playerElement, (err) => {
128 if (err) { 128 if (err) {
129 this.notificationsService.error('Error', 'Cannot append the file in the video element.') 129 this.notificationsService.error('Error', 'Cannot append the file in the video element.')