diff options
author | William Lahti <wilahti@gmail.com> | 2018-07-10 08:47:56 -0700 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-07-10 17:47:56 +0200 |
commit | 999417328bde0e60cd59318fc1c18672356254ce (patch) | |
tree | 22673fcbd4dc333e3362912b2c813e97a41c765f /server | |
parent | 0b755f3b27190ea4d9c301ede0955b2736605f4c (diff) | |
download | PeerTube-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 'server')
-rw-r--r-- | server/controllers/client.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/controllers/client.ts b/server/controllers/client.ts index dfffe5487..5413f61e8 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts | |||
@@ -21,6 +21,7 @@ const clientsRouter = express.Router() | |||
21 | const distPath = join(root(), 'client', 'dist') | 21 | const distPath = join(root(), 'client', 'dist') |
22 | const assetsImagesPath = join(root(), 'client', 'dist', 'assets', 'images') | 22 | const assetsImagesPath = join(root(), 'client', 'dist', 'assets', 'images') |
23 | const embedPath = join(distPath, 'standalone', 'videos', 'embed.html') | 23 | const embedPath = join(distPath, 'standalone', 'videos', 'embed.html') |
24 | const testEmbedPath = join(distPath, 'standalone', 'videos', 'test-embed.html') | ||
24 | 25 | ||
25 | // Special route that add OpenGraph and oEmbed tags | 26 | // Special route that add OpenGraph and oEmbed tags |
26 | // Do not use a template engine for a so little thing | 27 | // Do not use a template engine for a so little thing |
@@ -32,6 +33,10 @@ clientsRouter.use('' + | |||
32 | '/videos/embed', (req: express.Request, res: express.Response, next: express.NextFunction) => { | 33 | '/videos/embed', (req: express.Request, res: express.Response, next: express.NextFunction) => { |
33 | res.sendFile(embedPath) | 34 | res.sendFile(embedPath) |
34 | }) | 35 | }) |
36 | clientsRouter.use('' + | ||
37 | '/videos/test-embed', (req: express.Request, res: express.Response, next: express.NextFunction) => { | ||
38 | res.sendFile(testEmbedPath) | ||
39 | }) | ||
35 | 40 | ||
36 | // Static HTML/CSS/JS client files | 41 | // Static HTML/CSS/JS client files |
37 | 42 | ||