From 294f80f21e8a77d25f6fb5f0f26887fb4618ee2e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sun, 11 Jun 2017 15:25:36 +0200 Subject: Bundle webtorrent with webpack. Closes https://github.com/Chocobozzz/PeerTube/issues/50 --- client/src/app/videos/video-watch/video-watch.component.ts | 6 +++--- client/src/app/videos/video-watch/webtorrent.service.ts | 2 +- client/src/index.html | 3 --- 3 files changed, 4 insertions(+), 7 deletions(-) (limited to 'client/src') 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 32c847785..bcfebf2fd 100644 --- a/client/src/app/videos/video-watch/video-watch.component.ts +++ b/client/src/app/videos/video-watch/video-watch.component.ts @@ -21,15 +21,15 @@ import { WebTorrentService } from './webtorrent.service'; }) export class VideoWatchComponent implements OnInit, OnDestroy { - private static LOADTIME_TOO_LONG: number = 20000; + private static LOADTIME_TOO_LONG = 20000; @ViewChild('videoMagnetModal') videoMagnetModal: VideoMagnetComponent; @ViewChild('videoShareModal') videoShareModal: VideoShareComponent; @ViewChild('videoReportModal') videoReportModal: VideoReportComponent; downloadSpeed: number; - error: boolean = false; - loading: boolean = false; + error = false; + loading = false; numPeers: number; player: videojs.Player; playerElement: Element; diff --git a/client/src/app/videos/video-watch/webtorrent.service.ts b/client/src/app/videos/video-watch/webtorrent.service.ts index 630a5c469..8936e7992 100644 --- a/client/src/app/videos/video-watch/webtorrent.service.ts +++ b/client/src/app/videos/video-watch/webtorrent.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { Subject } from 'rxjs/Subject'; -declare const WebTorrent; +import * as WebTorrent from 'webtorrent'; @Injectable() export class WebTorrentService { diff --git a/client/src/index.html b/client/src/index.html index ea88bb15b..4346775b1 100644 --- a/client/src/index.html +++ b/client/src/index.html @@ -11,9 +11,6 @@ - - - -- cgit v1.2.3