2017-06-16 12:32:15 +00:00
|
|
|
import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core'
|
|
|
|
import { ActivatedRoute, Router } from '@angular/router'
|
|
|
|
import { Observable } from 'rxjs/Observable'
|
|
|
|
import { Subscription } from 'rxjs/Subscription'
|
|
|
|
|
2017-07-06 12:39:39 +00:00
|
|
|
import videojs from 'video.js'
|
2017-07-06 15:43:58 +00:00
|
|
|
import { MetaService } from '@ngx-meta/core'
|
2017-06-16 12:32:15 +00:00
|
|
|
import { NotificationsService } from 'angular2-notifications'
|
|
|
|
|
|
|
|
import { AuthService, ConfirmService } from '../../core'
|
|
|
|
import { VideoMagnetComponent } from './video-magnet.component'
|
|
|
|
import { VideoShareComponent } from './video-share.component'
|
|
|
|
import { VideoReportComponent } from './video-report.component'
|
2017-06-17 09:28:11 +00:00
|
|
|
import { Video, VideoService } from '../shared'
|
2017-06-16 12:32:15 +00:00
|
|
|
import { WebTorrentService } from './webtorrent.service'
|
2017-06-17 09:28:11 +00:00
|
|
|
import { UserVideoRateType, VideoRateType, UserVideoRate } from '../../../../../shared'
|
2016-03-14 12:50:19 +00:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'my-video-watch',
|
2016-09-19 20:49:31 +00:00
|
|
|
templateUrl: './video-watch.component.html',
|
|
|
|
styleUrls: [ './video-watch.component.scss' ]
|
2016-03-14 12:50:19 +00:00
|
|
|
})
|
2016-07-08 15:15:14 +00:00
|
|
|
export class VideoWatchComponent implements OnInit, OnDestroy {
|
2017-06-16 12:32:15 +00:00
|
|
|
private static LOADTIME_TOO_LONG = 20000
|
|
|
|
|
|
|
|
@ViewChild('videoMagnetModal') videoMagnetModal: VideoMagnetComponent
|
|
|
|
@ViewChild('videoShareModal') videoShareModal: VideoShareComponent
|
|
|
|
@ViewChild('videoReportModal') videoReportModal: VideoReportComponent
|
|
|
|
|
|
|
|
downloadSpeed: number
|
|
|
|
error = false
|
|
|
|
loading = false
|
|
|
|
numPeers: number
|
|
|
|
player: videojs.Player
|
2017-07-11 08:09:18 +00:00
|
|
|
playerElement: HTMLMediaElement
|
2017-06-16 12:32:15 +00:00
|
|
|
uploadSpeed: number
|
2017-06-17 09:28:11 +00:00
|
|
|
userRating: UserVideoRateType = null
|
2017-06-16 12:32:15 +00:00
|
|
|
video: Video = null
|
|
|
|
videoNotFound = false
|
|
|
|
|
|
|
|
private errorTimer: number
|
|
|
|
private paramsSub: Subscription
|
|
|
|
private errorsSub: Subscription
|
|
|
|
private torrentInfosInterval: number
|
|
|
|
|
|
|
|
constructor (
|
2016-05-27 15:49:18 +00:00
|
|
|
private elementRef: ElementRef,
|
2016-08-12 15:35:00 +00:00
|
|
|
private ngZone: NgZone,
|
2016-07-08 15:15:14 +00:00
|
|
|
private route: ActivatedRoute,
|
2017-04-04 19:37:03 +00:00
|
|
|
private router: Router,
|
2016-05-31 20:39:36 +00:00
|
|
|
private videoService: VideoService,
|
2017-04-04 19:37:03 +00:00
|
|
|
private confirmService: ConfirmService,
|
2016-11-04 16:37:44 +00:00
|
|
|
private metaService: MetaService,
|
2017-01-20 18:22:15 +00:00
|
|
|
private webTorrentService: WebTorrentService,
|
2017-01-27 15:14:11 +00:00
|
|
|
private authService: AuthService,
|
|
|
|
private notificationsService: NotificationsService
|
2016-05-31 20:39:36 +00:00
|
|
|
) {}
|
2016-03-14 12:50:19 +00:00
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
ngOnInit () {
|
2017-01-29 17:35:19 +00:00
|
|
|
this.paramsSub = this.route.params.subscribe(routeParams => {
|
2017-07-11 14:01:56 +00:00
|
|
|
let uuid = routeParams['uuid']
|
|
|
|
this.videoService.getVideo(uuid).subscribe(
|
2017-04-04 19:37:03 +00:00
|
|
|
video => this.onVideoFetched(video),
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
error => {
|
|
|
|
console.error(error)
|
|
|
|
this.videoNotFound = true
|
|
|
|
}
|
|
|
|
)
|
|
|
|
})
|
2016-11-08 19:49:43 +00:00
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
this.playerElement = this.elementRef.nativeElement.querySelector('#video-container')
|
2016-11-08 20:17:17 +00:00
|
|
|
|
2016-11-08 19:49:43 +00:00
|
|
|
const videojsOptions = {
|
|
|
|
controls: true,
|
2017-07-06 14:26:18 +00:00
|
|
|
autoplay: true
|
2017-06-16 12:32:15 +00:00
|
|
|
}
|
2016-11-08 19:49:43 +00:00
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
const self = this
|
2016-11-08 20:17:17 +00:00
|
|
|
videojs(this.playerElement, videojsOptions, function () {
|
2017-06-16 12:32:15 +00:00
|
|
|
self.player = this
|
|
|
|
})
|
2017-01-29 17:35:19 +00:00
|
|
|
|
2017-07-23 09:07:30 +00:00
|
|
|
this.errorsSub = this.webTorrentService.errors.subscribe(err => this.handleError(err))
|
2016-11-04 15:04:50 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
ngOnDestroy () {
|
2016-11-08 20:17:17 +00:00
|
|
|
// Remove WebTorrent stuff
|
2017-06-16 12:32:15 +00:00
|
|
|
console.log('Removing video from webtorrent.')
|
|
|
|
window.clearInterval(this.torrentInfosInterval)
|
|
|
|
window.clearTimeout(this.errorTimer)
|
2016-11-16 19:09:36 +00:00
|
|
|
|
2017-08-25 09:36:23 +00:00
|
|
|
if (this.video !== null && this.webTorrentService.has(this.video.getDefaultMagnetUri())) {
|
|
|
|
this.webTorrentService.remove(this.video.getDefaultMagnetUri())
|
2016-11-16 19:09:36 +00:00
|
|
|
}
|
2016-11-04 15:04:50 +00:00
|
|
|
|
2016-11-08 20:17:17 +00:00
|
|
|
// Remove player
|
2017-06-16 12:32:15 +00:00
|
|
|
videojs(this.playerElement).dispose()
|
2016-11-08 20:17:17 +00:00
|
|
|
|
2017-01-29 17:35:19 +00:00
|
|
|
// Unsubscribe subscriptions
|
2017-06-16 12:32:15 +00:00
|
|
|
this.paramsSub.unsubscribe()
|
|
|
|
this.errorsSub.unsubscribe()
|
2016-11-04 15:04:50 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
loadVideo () {
|
2016-06-05 10:20:25 +00:00
|
|
|
// Reset the error
|
2017-06-16 12:32:15 +00:00
|
|
|
this.error = false
|
2016-06-05 10:20:25 +00:00
|
|
|
// We are loading the video
|
2017-06-16 12:32:15 +00:00
|
|
|
this.loading = true
|
2016-06-05 10:20:25 +00:00
|
|
|
|
2017-08-25 09:36:23 +00:00
|
|
|
console.log('Adding ' + this.video.getDefaultMagnetUri() + '.')
|
2016-05-31 20:39:36 +00:00
|
|
|
|
2016-06-05 10:20:25 +00:00
|
|
|
// The callback might never return if there are network issues
|
|
|
|
// So we create a timer to inform the user the load is abnormally long
|
2017-06-16 12:32:15 +00:00
|
|
|
this.errorTimer = window.setTimeout(() => this.loadTooLong(), VideoWatchComponent.LOADTIME_TOO_LONG)
|
2016-06-05 10:20:25 +00:00
|
|
|
|
2017-08-25 09:36:23 +00:00
|
|
|
const torrent = this.webTorrentService.add(this.video.getDefaultMagnetUri(), torrent => {
|
2016-06-05 10:20:25 +00:00
|
|
|
// Clear the error timer
|
2017-06-16 12:32:15 +00:00
|
|
|
window.clearTimeout(this.errorTimer)
|
2016-06-05 10:20:25 +00:00
|
|
|
// Maybe the error was fired by the timer, so reset it
|
2017-06-16 12:32:15 +00:00
|
|
|
this.error = false
|
2016-06-05 10:20:25 +00:00
|
|
|
|
|
|
|
// We are not loading the video anymore
|
2017-06-16 12:32:15 +00:00
|
|
|
this.loading = false
|
2016-06-05 10:20:25 +00:00
|
|
|
|
2017-08-25 09:36:23 +00:00
|
|
|
console.log('Added ' + this.video.getDefaultMagnetUri() + '.')
|
2017-07-06 14:26:18 +00:00
|
|
|
torrent.files[0].renderTo(this.playerElement, (err) => {
|
2016-03-14 12:50:19 +00:00
|
|
|
if (err) {
|
2017-06-16 12:32:15 +00:00
|
|
|
this.notificationsService.error('Error', 'Cannot append the file in the video element.')
|
|
|
|
console.error(err)
|
2016-03-14 12:50:19 +00:00
|
|
|
}
|
2017-07-06 14:26:18 +00:00
|
|
|
|
|
|
|
// Hack to "simulate" src link in video.js >= 6
|
|
|
|
// If no, we can't play the video after pausing it
|
|
|
|
// https://github.com/videojs/video.js/blob/master/src/js/player.js#L1633
|
|
|
|
(this.player as any).src = () => true
|
|
|
|
|
|
|
|
this.player.play()
|
2017-06-16 12:32:15 +00:00
|
|
|
})
|
2016-04-28 18:40:56 +00:00
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
this.runInProgress(torrent)
|
|
|
|
})
|
2017-07-23 09:07:30 +00:00
|
|
|
|
|
|
|
torrent.on('error', err => this.handleError(err))
|
|
|
|
torrent.on('warning', err => this.handleError(err))
|
2016-03-14 12:50:19 +00:00
|
|
|
}
|
2016-03-14 21:16:43 +00:00
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
setLike () {
|
|
|
|
if (this.isUserLoggedIn() === false) return
|
2017-03-08 20:35:43 +00:00
|
|
|
// Already liked this video
|
2017-06-16 12:32:15 +00:00
|
|
|
if (this.userRating === 'like') return
|
2017-03-08 20:35:43 +00:00
|
|
|
|
|
|
|
this.videoService.setVideoLike(this.video.id)
|
|
|
|
.subscribe(
|
|
|
|
() => {
|
|
|
|
// Update the video like attribute
|
2017-06-16 12:32:15 +00:00
|
|
|
this.updateVideoRating(this.userRating, 'like')
|
|
|
|
this.userRating = 'like'
|
2017-03-08 20:35:43 +00:00
|
|
|
},
|
|
|
|
|
2017-09-14 15:06:31 +00:00
|
|
|
err => this.notificationsService.error('Error', err.message)
|
2017-06-16 12:32:15 +00:00
|
|
|
)
|
2017-03-08 20:35:43 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
setDislike () {
|
|
|
|
if (this.isUserLoggedIn() === false) return
|
2017-03-08 20:35:43 +00:00
|
|
|
// Already disliked this video
|
2017-06-16 12:32:15 +00:00
|
|
|
if (this.userRating === 'dislike') return
|
2017-03-08 20:35:43 +00:00
|
|
|
|
|
|
|
this.videoService.setVideoDislike(this.video.id)
|
|
|
|
.subscribe(
|
|
|
|
() => {
|
|
|
|
// Update the video dislike attribute
|
2017-06-16 12:32:15 +00:00
|
|
|
this.updateVideoRating(this.userRating, 'dislike')
|
|
|
|
this.userRating = 'dislike'
|
2017-03-08 20:35:43 +00:00
|
|
|
},
|
|
|
|
|
2017-09-14 15:06:31 +00:00
|
|
|
err => this.notificationsService.error('Error', err.message)
|
2017-06-16 12:32:15 +00:00
|
|
|
)
|
2017-03-08 20:35:43 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
removeVideo (event: Event) {
|
|
|
|
event.preventDefault()
|
2017-04-26 19:42:36 +00:00
|
|
|
|
2017-04-26 19:22:10 +00:00
|
|
|
this.confirmService.confirm('Do you really want to delete this video?', 'Delete').subscribe(
|
|
|
|
res => {
|
2017-06-16 12:32:15 +00:00
|
|
|
if (res === false) return
|
2017-04-26 19:22:10 +00:00
|
|
|
|
|
|
|
this.videoService.removeVideo(this.video.id)
|
2017-04-26 19:42:36 +00:00
|
|
|
.subscribe(
|
|
|
|
status => {
|
2017-06-16 12:32:15 +00:00
|
|
|
this.notificationsService.success('Success', `Video ${this.video.name} deleted.`)
|
2017-04-26 19:42:36 +00:00
|
|
|
// Go back to the video-list.
|
2017-06-16 12:32:15 +00:00
|
|
|
this.router.navigate(['/videos/list'])
|
2017-04-26 19:42:36 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
error => this.notificationsService.error('Error', error.text)
|
2017-06-16 12:32:15 +00:00
|
|
|
)
|
2017-04-26 19:22:10 +00:00
|
|
|
}
|
2017-06-16 12:32:15 +00:00
|
|
|
)
|
2017-04-26 19:22:10 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
blacklistVideo (event: Event) {
|
|
|
|
event.preventDefault()
|
2017-04-26 19:42:36 +00:00
|
|
|
|
2017-04-26 19:22:10 +00:00
|
|
|
this.confirmService.confirm('Do you really want to blacklist this video ?', 'Blacklist').subscribe(
|
|
|
|
res => {
|
2017-06-16 12:32:15 +00:00
|
|
|
if (res === false) return
|
2017-04-26 19:22:10 +00:00
|
|
|
|
2017-04-26 19:42:36 +00:00
|
|
|
this.videoService.blacklistVideo(this.video.id)
|
|
|
|
.subscribe(
|
|
|
|
status => {
|
2017-06-16 12:32:15 +00:00
|
|
|
this.notificationsService.success('Success', `Video ${this.video.name} had been blacklisted.`)
|
|
|
|
this.router.navigate(['/videos/list'])
|
2017-04-26 19:42:36 +00:00
|
|
|
},
|
2017-04-26 19:22:10 +00:00
|
|
|
|
2017-04-26 19:42:36 +00:00
|
|
|
error => this.notificationsService.error('Error', error.text)
|
2017-06-16 12:32:15 +00:00
|
|
|
)
|
2017-04-26 19:22:10 +00:00
|
|
|
}
|
2017-06-16 12:32:15 +00:00
|
|
|
)
|
2017-04-26 19:22:10 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
showReportModal (event: Event) {
|
|
|
|
event.preventDefault()
|
|
|
|
this.videoReportModal.show()
|
2017-01-20 18:22:15 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
showShareModal () {
|
|
|
|
this.videoShareModal.show()
|
2016-11-08 20:11:57 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
showMagnetUriModal (event: Event) {
|
|
|
|
event.preventDefault()
|
|
|
|
this.videoMagnetModal.show()
|
2016-11-08 20:11:57 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
isUserLoggedIn () {
|
|
|
|
return this.authService.isLoggedIn()
|
2017-01-20 18:22:15 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
canUserUpdateVideo () {
|
|
|
|
return this.video.isUpdatableBy(this.authService.getUser())
|
2017-04-10 19:15:28 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
isVideoRemovable () {
|
|
|
|
return this.video.isRemovableBy(this.authService.getUser())
|
2017-04-26 19:22:10 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
isVideoBlacklistable () {
|
|
|
|
return this.video.isBlackistableBy(this.authService.getUser())
|
2017-04-26 19:22:10 +00:00
|
|
|
}
|
|
|
|
|
2017-07-23 09:07:30 +00:00
|
|
|
private handleError (err: any) {
|
|
|
|
const errorMessage: string = typeof err === 'string' ? err : err.message
|
|
|
|
let message = ''
|
|
|
|
|
|
|
|
if (errorMessage.indexOf('http error') !== -1) {
|
|
|
|
message = 'Cannot fetch video from server, maybe down.'
|
|
|
|
} else {
|
|
|
|
message = errorMessage
|
|
|
|
}
|
|
|
|
|
|
|
|
this.notificationsService.error('Error', message)
|
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
private checkUserRating () {
|
2017-03-08 20:35:43 +00:00
|
|
|
// Unlogged users do not have ratings
|
2017-06-16 12:32:15 +00:00
|
|
|
if (this.isUserLoggedIn() === false) return
|
2017-03-08 20:35:43 +00:00
|
|
|
|
|
|
|
this.videoService.getUserVideoRating(this.video.id)
|
|
|
|
.subscribe(
|
2017-06-20 18:20:09 +00:00
|
|
|
ratingObject => {
|
2017-03-08 20:35:43 +00:00
|
|
|
if (ratingObject) {
|
2017-06-16 12:32:15 +00:00
|
|
|
this.userRating = ratingObject.rating
|
2017-03-08 20:35:43 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2017-09-14 15:06:31 +00:00
|
|
|
err => this.notificationsService.error('Error', err.message)
|
2017-06-16 12:32:15 +00:00
|
|
|
)
|
2017-03-08 20:35:43 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
private onVideoFetched (video: Video) {
|
|
|
|
this.video = video
|
2017-04-04 19:37:03 +00:00
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
let observable
|
2017-04-04 19:37:03 +00:00
|
|
|
if (this.video.isVideoNSFWForUser(this.authService.getUser())) {
|
2017-06-16 12:32:15 +00:00
|
|
|
observable = this.confirmService.confirm('This video is not safe for work. Are you sure you want to watch it?', 'NSFW')
|
2017-04-04 19:37:03 +00:00
|
|
|
} else {
|
2017-06-16 12:32:15 +00:00
|
|
|
observable = Observable.of(true)
|
2017-04-04 19:37:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
observable.subscribe(
|
|
|
|
res => {
|
|
|
|
if (res === false) {
|
2017-06-16 12:32:15 +00:00
|
|
|
return this.router.navigate([ '/videos/list' ])
|
2017-04-04 19:37:03 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
this.setOpenGraphTags()
|
|
|
|
this.loadVideo()
|
|
|
|
this.checkUserRating()
|
2017-04-04 19:37:03 +00:00
|
|
|
}
|
2017-06-16 12:32:15 +00:00
|
|
|
)
|
2017-04-04 19:37:03 +00:00
|
|
|
}
|
|
|
|
|
2017-06-17 09:28:11 +00:00
|
|
|
private updateVideoRating (oldRating: UserVideoRateType, newRating: VideoRateType) {
|
2017-06-16 12:32:15 +00:00
|
|
|
let likesToIncrement = 0
|
|
|
|
let dislikesToIncrement = 0
|
2017-03-08 20:35:43 +00:00
|
|
|
|
|
|
|
if (oldRating) {
|
2017-06-16 12:32:15 +00:00
|
|
|
if (oldRating === 'like') likesToIncrement--
|
|
|
|
if (oldRating === 'dislike') dislikesToIncrement--
|
2017-03-08 20:35:43 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
if (newRating === 'like') likesToIncrement++
|
|
|
|
if (newRating === 'dislike') dislikesToIncrement++
|
2017-03-08 20:35:43 +00:00
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
this.video.likes += likesToIncrement
|
|
|
|
this.video.dislikes += dislikesToIncrement
|
2017-03-08 20:35:43 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
private loadTooLong () {
|
|
|
|
this.error = true
|
|
|
|
console.error('The video load seems to be abnormally long.')
|
2016-06-05 10:20:25 +00:00
|
|
|
}
|
2016-08-12 15:35:00 +00:00
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
private setOpenGraphTags () {
|
|
|
|
this.metaService.setTitle(this.video.name)
|
2017-03-10 09:33:36 +00:00
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
this.metaService.setTag('og:type', 'video')
|
2016-11-04 16:37:44 +00:00
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
this.metaService.setTag('og:title', this.video.name)
|
|
|
|
this.metaService.setTag('name', this.video.name)
|
2016-11-04 16:37:44 +00:00
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
this.metaService.setTag('og:description', this.video.description)
|
|
|
|
this.metaService.setTag('description', this.video.description)
|
2016-11-04 16:37:44 +00:00
|
|
|
|
2017-07-12 10:19:39 +00:00
|
|
|
this.metaService.setTag('og:image', this.video.previewPath)
|
2016-11-04 16:37:44 +00:00
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
this.metaService.setTag('og:duration', this.video.duration.toString())
|
2016-11-04 16:37:44 +00:00
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
this.metaService.setTag('og:site_name', 'PeerTube')
|
2016-11-04 16:37:44 +00:00
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
this.metaService.setTag('og:url', window.location.href)
|
|
|
|
this.metaService.setTag('url', window.location.href)
|
2016-11-04 16:37:44 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 12:32:15 +00:00
|
|
|
private runInProgress (torrent: any) {
|
2016-08-12 15:35:00 +00:00
|
|
|
// Refresh each second
|
2017-01-27 10:30:36 +00:00
|
|
|
this.torrentInfosInterval = window.setInterval(() => {
|
2016-08-12 15:35:00 +00:00
|
|
|
this.ngZone.run(() => {
|
2017-06-16 12:32:15 +00:00
|
|
|
this.downloadSpeed = torrent.downloadSpeed
|
|
|
|
this.numPeers = torrent.numPeers
|
|
|
|
this.uploadSpeed = torrent.uploadSpeed
|
|
|
|
})
|
|
|
|
}, 1000)
|
2016-08-12 15:35:00 +00:00
|
|
|
}
|
2016-03-14 12:50:19 +00:00
|
|
|
}
|