pull/71/head
Chocobozzz 2017-06-11 15:25:36 +02:00
parent 1840c2f7c9
commit 294f80f21e
6 changed files with 6 additions and 19 deletions

View File

@ -260,10 +260,6 @@ module.exports = function (options) {
from: 'src/assets', from: 'src/assets',
to: 'assets' to: 'assets'
}, },
{
from: 'node_modules/webtorrent/webtorrent.min.js',
to: 'assets/webtorrent'
},
{ {
from: 'src/standalone', from: 'src/standalone',
to: 'standalone' to: 'standalone'

View File

@ -83,10 +83,6 @@ module.exports = function (env) {
libraryTarget: 'var' libraryTarget: 'var'
}, },
externals: {
webtorrent: 'WebTorrent'
},
module: { module: {
// Too slow, life is short // Too slow, life is short
@ -246,6 +242,7 @@ module.exports = function (env) {
node: { node: {
global: true, global: true,
crypto: 'empty', crypto: 'empty',
fs: 'empty',
process: true, process: true,
module: false, module: false,
clearImmediate: false, clearImmediate: false,

View File

@ -81,10 +81,6 @@ module.exports = function (env) {
publicPath: '/client/' publicPath: '/client/'
}, },
externals: {
webtorrent: 'WebTorrent'
},
/** /**
* Add additional plugins to the compiler. * Add additional plugins to the compiler.
* *
@ -272,6 +268,7 @@ module.exports = function (env) {
node: { node: {
global: true, global: true,
crypto: 'empty', crypto: 'empty',
fs: 'empty',
process: false, process: false,
module: false, module: false,
clearImmediate: false, clearImmediate: false,

View File

@ -21,15 +21,15 @@ import { WebTorrentService } from './webtorrent.service';
}) })
export class VideoWatchComponent implements OnInit, OnDestroy { export class VideoWatchComponent implements OnInit, OnDestroy {
private static LOADTIME_TOO_LONG: number = 20000; private static LOADTIME_TOO_LONG = 20000;
@ViewChild('videoMagnetModal') videoMagnetModal: VideoMagnetComponent; @ViewChild('videoMagnetModal') videoMagnetModal: VideoMagnetComponent;
@ViewChild('videoShareModal') videoShareModal: VideoShareComponent; @ViewChild('videoShareModal') videoShareModal: VideoShareComponent;
@ViewChild('videoReportModal') videoReportModal: VideoReportComponent; @ViewChild('videoReportModal') videoReportModal: VideoReportComponent;
downloadSpeed: number; downloadSpeed: number;
error: boolean = false; error = false;
loading: boolean = false; loading = false;
numPeers: number; numPeers: number;
player: videojs.Player; player: videojs.Player;
playerElement: Element; playerElement: Element;

View File

@ -1,7 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Subject } from 'rxjs/Subject'; import { Subject } from 'rxjs/Subject';
declare const WebTorrent; import * as WebTorrent from 'webtorrent';
@Injectable() @Injectable()
export class WebTorrentService { export class WebTorrentService {

View File

@ -11,9 +11,6 @@
<!-- opengraph tags --> <!-- opengraph tags -->
<!-- Do not remove it! --> <!-- Do not remove it! -->
<!-- TODO: bundle it with webpack when https://github.com/webpack/webpack/pull/1931 will be merged -->
<!-- <script src="/client/assets/webtorrent/webtorrent.min.js"></script> -->
<link rel="icon" type="image/png" href="/client/assets/favicon.png" /> <link rel="icon" type="image/png" href="/client/assets/favicon.png" />
<!-- base url --> <!-- base url -->