This commit is contained in:
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',
to: 'assets'
},
{
from: 'node_modules/webtorrent/webtorrent.min.js',
to: 'assets/webtorrent'
},
{
from: 'src/standalone',
to: 'standalone'

View File

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

View File

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

View File

@ -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;

View File

@ -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 {

View File

@ -11,9 +11,6 @@
<!-- opengraph tags -->
<!-- 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" />
<!-- base url -->