From 999417328bde0e60cd59318fc1c18672356254ce Mon Sep 17 00:00:00 2001 From: William Lahti Date: Tue, 10 Jul 2018 08:47:56 -0700 Subject: Ability to programmatically control embeds (#776) * first stab at jschannel based player api * semicolon purge * more method-level docs; consolidate definitions * missing definitions * better match peertube's class conventions * styling for embed tester * basic docs * add `getVolume` * document the test-embed feature --- client/webpack/webpack.video-embed.js | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'client/webpack') diff --git a/client/webpack/webpack.video-embed.js b/client/webpack/webpack.video-embed.js index 403a65930..979da0dff 100644 --- a/client/webpack/webpack.video-embed.js +++ b/client/webpack/webpack.video-embed.js @@ -14,7 +14,9 @@ module.exports = function () { const configuration = { entry: { - 'video-embed': './src/standalone/videos/embed.ts' + 'video-embed': './src/standalone/videos/embed.ts', + 'player': './src/standalone/player/player.ts', + 'test-embed': './src/standalone/videos/test-embed.ts' }, resolve: { @@ -89,7 +91,8 @@ module.exports = function () { use: 'raw-loader', exclude: [ helpers.root('src/index.html'), - helpers.root('src/standalone/videos/embed.html') + helpers.root('src/standalone/videos/embed.html'), + helpers.root('src/standalone/videos/test-embed.html') ] }, @@ -110,7 +113,10 @@ module.exports = function () { }), new PurifyCSSPlugin({ - paths: [ helpers.root('src/standalone/videos/embed.ts') ], + paths: [ + helpers.root('src/standalone/videos/embed.ts'), + helpers.root('src/standalone/videos/test-embed.html') + ], purifyOptions: { minify: true, whitelist: [ '*vjs*', '*video-js*' ] @@ -124,7 +130,17 @@ module.exports = function () { filename: 'embed.html', title: 'PeerTube', chunksSortMode: 'dependency', - inject: 'body' + inject: 'body', + chunks: ['video-embed'] + }), + + new HtmlWebpackPlugin({ + template: '!!html-loader!src/standalone/videos/test-embed.html', + filename: 'test-embed.html', + title: 'PeerTube', + chunksSortMode: 'dependency', + inject: 'body', + chunks: ['test-embed'] }), /** -- cgit v1.2.3