aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/webpack/webpack.video-embed.js
diff options
context:
space:
mode:
authorWilliam Lahti <wilahti@gmail.com>2018-07-10 08:47:56 -0700
committerChocobozzz <me@florianbigard.com>2018-07-10 17:47:56 +0200
commit999417328bde0e60cd59318fc1c18672356254ce (patch)
tree22673fcbd4dc333e3362912b2c813e97a41c765f /client/webpack/webpack.video-embed.js
parent0b755f3b27190ea4d9c301ede0955b2736605f4c (diff)
downloadPeerTube-999417328bde0e60cd59318fc1c18672356254ce.tar.gz
PeerTube-999417328bde0e60cd59318fc1c18672356254ce.tar.zst
PeerTube-999417328bde0e60cd59318fc1c18672356254ce.zip
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
Diffstat (limited to 'client/webpack/webpack.video-embed.js')
-rw-r--r--client/webpack/webpack.video-embed.js24
1 files changed, 20 insertions, 4 deletions
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 () {
14 14
15 const configuration = { 15 const configuration = {
16 entry: { 16 entry: {
17 'video-embed': './src/standalone/videos/embed.ts' 17 'video-embed': './src/standalone/videos/embed.ts',
18 'player': './src/standalone/player/player.ts',
19 'test-embed': './src/standalone/videos/test-embed.ts'
18 }, 20 },
19 21
20 resolve: { 22 resolve: {
@@ -89,7 +91,8 @@ module.exports = function () {
89 use: 'raw-loader', 91 use: 'raw-loader',
90 exclude: [ 92 exclude: [
91 helpers.root('src/index.html'), 93 helpers.root('src/index.html'),
92 helpers.root('src/standalone/videos/embed.html') 94 helpers.root('src/standalone/videos/embed.html'),
95 helpers.root('src/standalone/videos/test-embed.html')
93 ] 96 ]
94 }, 97 },
95 98
@@ -110,7 +113,10 @@ module.exports = function () {
110 }), 113 }),
111 114
112 new PurifyCSSPlugin({ 115 new PurifyCSSPlugin({
113 paths: [ helpers.root('src/standalone/videos/embed.ts') ], 116 paths: [
117 helpers.root('src/standalone/videos/embed.ts'),
118 helpers.root('src/standalone/videos/test-embed.html')
119 ],
114 purifyOptions: { 120 purifyOptions: {
115 minify: true, 121 minify: true,
116 whitelist: [ '*vjs*', '*video-js*' ] 122 whitelist: [ '*vjs*', '*video-js*' ]
@@ -124,7 +130,17 @@ module.exports = function () {
124 filename: 'embed.html', 130 filename: 'embed.html',
125 title: 'PeerTube', 131 title: 'PeerTube',
126 chunksSortMode: 'dependency', 132 chunksSortMode: 'dependency',
127 inject: 'body' 133 inject: 'body',
134 chunks: ['video-embed']
135 }),
136
137 new HtmlWebpackPlugin({
138 template: '!!html-loader!src/standalone/videos/test-embed.html',
139 filename: 'test-embed.html',
140 title: 'PeerTube',
141 chunksSortMode: 'dependency',
142 inject: 'body',
143 chunks: ['test-embed']
128 }), 144 }),
129 145
130 /** 146 /**