diff options
author | lonkaars <loek@pipeframe.xyz> | 2021-05-13 21:46:45 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2021-05-13 21:46:45 +0200 |
commit | 7e4f1f5fc3c57a700bef42740d9ff48f2b437a04 (patch) | |
tree | 707e1db8afc3db91e0d6dada5aba7de1e5689ee7 | |
parent | c9b1cb51efcbf2ca47bdbf64f3972023d6934c23 (diff) |
read name from timeline.json
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | pages/present.tsx | 2 | ||||
-rw-r--r-- | timeline.schema.json | 23 | ||||
-rw-r--r-- | timeline.ts | 6 |
4 files changed, 29 insertions, 5 deletions
@@ -34,6 +34,3 @@ yarn-error.log* # vercel .vercel -# typescript-json-validator -timeline.validator.ts - diff --git a/pages/present.tsx b/pages/present.tsx index 1e37702..9e65e29 100644 --- a/pages/present.tsx +++ b/pages/present.tsx @@ -225,7 +225,7 @@ export default function Present() { <div className='info sidebyside posabs h0 b0'> <div className='timetitle floatb'> <h3 className='time numbers nobr' id='time'>14:00:41</h3> - <h1 className='title nobr'>PWS Presentatie</h1> + <h1 className='title nobr'>{player.timeline?.name || '???'}</h1> </div> <div className='buttons floatb'> <div className='inner center'> diff --git a/timeline.schema.json b/timeline.schema.json index aa12da1..c92e722 100644 --- a/timeline.schema.json +++ b/timeline.schema.json @@ -75,6 +75,19 @@ ], "type": "object" }, + "presentationSettings": { + "additionalProperties": false, + "properties": { + "controlType": { + "const": "FullScreen", + "type": "string" + } + }, + "required": [ + "controlType" + ], + "type": "object" + }, "slide": { "additionalProperties": false, "properties": { @@ -136,6 +149,12 @@ "framerate": { "type": "number" }, + "name": { + "type": "string" + }, + "settings": { + "$ref": "#/definitions/presentationSettings" + }, "slides": { "items": { "anyOf": [ @@ -159,7 +178,9 @@ "required": [ "slides", "framecount", - "framerate" + "framerate", + "name", + "settings" ], "type": "object" } diff --git a/timeline.ts b/timeline.ts index 8bb4d98..3a51ed3 100644 --- a/timeline.ts +++ b/timeline.ts @@ -19,8 +19,14 @@ export interface loopSlide extends slide { playbackType: 'PingPong' | 'Normal'; } +export interface presentationSettings { + controlType: 'FullScreen'; +} + export default interface timeline { slides: Array<slide | delaySlide | speedChangeSlide | loopSlide>; framecount: number; framerate: number; + name: string; + settings: presentationSettings; } |