diff --git a/client/config/webpack.common.js b/client/config/webpack.common.js index 5ef5621e6..4ab813d63 100644 --- a/client/config/webpack.common.js +++ b/client/config/webpack.common.js @@ -119,7 +119,7 @@ module.exports = function (options) { { test: /\.html$/, loader: 'raw-loader', - exclude: [ helpers.root('src/index.html') ] + exclude: [ helpers.root('src/index.html'), helpers.root('src/standalone/videos/embed.html') ] } ] @@ -187,6 +187,26 @@ module.exports = function (options) { { from: 'node_modules/webtorrent/webtorrent.min.js', to: 'assets/webtorrent' + }, + { + from: 'node_modules/video.js/dist/video.min.js', + to: 'assets/video-js' + }, + { + from: 'node_modules/video.js/dist/video-js.min.css', + to: 'assets/video-js' + }, + { + from: 'node_modules/videojs-dock/dist/videojs-dock.min.js', + to: 'assets/video-js' + }, + { + from: 'node_modules/videojs-dock/dist/videojs-dock.css', + to: 'assets/video-js' + }, + { + from: 'src/standalone', + to: 'standalone' } ]), @@ -213,6 +233,7 @@ module.exports = function (options) { * See: https://github.com/numical/script-ext-html-webpack-plugin */ new ScriptExtHtmlWebpackPlugin({ + sync: [ 'webtorrent.min.js' ], defaultAttribute: 'defer' }), diff --git a/client/package.json b/client/package.json index 4049967ab..34f79ee28 100644 --- a/client/package.json +++ b/client/package.json @@ -70,6 +70,9 @@ "tslint-loader": "^2.1.4", "typescript": "^2.0.0", "url-loader": "^0.5.7", + "video.js": "^5.11.9", + "videojs": "^1.0.0", + "videojs-dock": "^2.0.2", "webpack": "2.1.0-beta.25", "webpack-md5-hash": "0.0.5", "webpack-merge": "^0.15.0", 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 e705fa555..1d5fd45ee 100644 --- a/client/src/app/videos/video-watch/video-watch.component.ts +++ b/client/src/app/videos/video-watch/video-watch.component.ts @@ -62,6 +62,9 @@ export class VideoWatchComponent implements OnInit, OnDestroy { } loadVideo() { + + console.log(''); + // Reset the error this.error = false; // We are loading the video diff --git a/client/src/standalone/videos/embed.html b/client/src/standalone/videos/embed.html new file mode 100644 index 000000000..5b0541df3 --- /dev/null +++ b/client/src/standalone/videos/embed.html @@ -0,0 +1,99 @@ + + +
+