Skip to content

Commit

Permalink
WebVMT: Update Editor's Draft
Browse files Browse the repository at this point in the history
Revised cue JSON format
  • Loading branch information
rjksmith committed Oct 8, 2018
1 parent e859641 commit 68f00a3
Showing 1 changed file with 104 additions and 134 deletions.
238 changes: 104 additions & 134 deletions proposals/geotagging/webvmt/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -290,14 +290,12 @@ <h2>Hello World</h2>
rad:250

00:00:02.000 --&gt; 00:00:05.000
[
{ "moveto":
{ "lat": 51.504362, "lng": -0.076153 }
},
{ "lineto":
{ "lat": 51.506646, "lng": -0.074651 }
}
]
{ "moveto":
{ "lat": 51.504362, "lng": -0.076153 }
}
{ "lineto":
{ "lat": 51.506646, "lng": -0.074651 }
}
</pre>
</section>
<section id='mappresentation'>
Expand All @@ -320,18 +318,14 @@ <h2>Map Presentation</h2>
rad:500

00:00:03.000 --&gt;
[
{ "panto":
{ "lat": 51.508, "lng": -0.077, "end": "00:00:05.000" }
}
]
{ "panto":
{ "lat": 51.508, "lng": -0.077, "end": "00:00:05.000" }
}

00:00:06.000 --&gt;
[
{ "zoom":
{ "radius": 250 }
}
]
{ "zoom":
{ "radius": 250 }
}
</pre>
</section>
</section>
Expand Down Expand Up @@ -363,41 +357,35 @@ <h2>Comment Block</h2>
NOTE Tower Bridge

00:00:01.000 --&gt; 00:00:05.000
[
{ "moveto":
{ "lat": 51.504362, "lng": -0.076153 }
},
{ "lineto":
{ "lat": 51.506646, "lng": -0.074651 }
}
]
{ "moveto":
{ "lat": 51.504362, "lng": -0.076153 }
}
{ "lineto":
{ "lat": 51.506646, "lng": -0.074651 }
}

NOTE City Hall

00:00:02.000 --&gt;
[
{ "circle":
{ "lat": 51.504789, "lng": -0.078642, "rad": 20 }
}
]
{ "circle":
{ "lat": 51.504789, "lng": -0.078642, "rad": 20 }
}

NOTE Tower Of London
This line is also part of the comment

00:00:03.000 --&gt; 00:00:04.000
[
{ "polygon":
{ "points":
[ { "lat": 51.507193, "lng": -0.074844 },
{ "lat": 51.508756, "lng": -0.074716 },
{ "lat": 51.509036, "lng": -0.075638 },
{ "lat": 51.508929, "lng": -0.077162 },
{ "lat": 51.507727, "lng": -0.077848 },
{ "lat": 51.507220, "lng": -0.075767 }
]
}
{ "polygon":
{ "points":
[ { "lat": 51.507193, "lng": -0.074844 },
{ "lat": 51.508756, "lng": -0.074716 },
{ "lat": 51.509036, "lng": -0.075638 },
{ "lat": 51.508929, "lng": -0.077162 },
{ "lat": 51.507727, "lng": -0.077848 },
{ "lat": 51.507220, "lng": -0.075767 }
]
}
]
}
</pre>
</section>
</section>
Expand Down Expand Up @@ -471,14 +459,12 @@ <h2>CSS Style Block</h2>
NOTE Prime Meridian marker

00:00:00.000 --&gt;
[
{ "moveto":
{ "lat":51.477901, "lng": -0.001466 }
},
{ "lineto":
{ "lat":51.477946, "lng": -0.001466 }
}
]
{ "moveto":
{ "lat":51.477901, "lng": -0.001466 }
}
{ "lineto":
{ "lat":51.477946, "lng": -0.001466 }
}

NOTE Style blocks may not appear after the first cue
</pre>
Expand Down Expand Up @@ -521,51 +507,41 @@ <h2>Animated Path</h2>
NOTE London overview

00:00:01.000 --&gt;
[
{ "panto":
{ "lat": 51.4952, "lng": -0.1441 }
}
]
{ "panto":
{ "lat": 51.4952, "lng": -0.1441 }
}

00:00:02.000 --&gt;
[
{ "zoom":
{ "rad": 3000 }
}
]
{ "zoom":
{ "rad": 3000 }
}

NOTE From London Victoria...

00:00:03.000 --&gt;
[
{ "panto":
{ "lat": 50.830553, "lng": -0.141706, end: "00:00:25.000" }
},
{ "moveto":
{ "lat": 51.494477, "lng": -0.144753, "path": "cam1" }
},
{ "lineto":
{ "lat": 51.155958, "lng": -0.16089, "path": "cam1", "end":"00:00:10.000" }
}
]
{ "panto":
{ "lat": 50.830553, "lng": -0.141706, end: "00:00:25.000" }
}
{ "moveto":
{ "lat": 51.494477, "lng": -0.144753, "path": "cam1" }
}
{ "lineto":
{ "lat": 51.155958, "lng": -0.16089, "path": "cam1", "end": "00:00:10.000" }
}

NOTE ...via Gatwick Airport...

00:00:10.000 --&gt;
[
{ "lineto":
{ "lat": 50.830553, "lng": -0.141706, "path": "cam1", "end": "00:00:25.000" }
}
]
{ "lineto":
{ "lat": 50.830553, "lng": -0.141706, "path": "cam1", "end": "00:00:25.000" }
}

NOTE ...to Brighton (at 00:00:25.000)

00:00:27.000 --&gt;
[
{ "zoom":
{ "rad": 30000 }
}
]
{ "zoom":
{ "rad": 30000 }
}
</pre>
</section>
<section id='animatedannotation'>
Expand All @@ -591,49 +567,43 @@ <h2>Animated Annotation</h2>
NOTE Drone starts at (51.0130, -0.0015)

00:00:05.000 --&gt;
[
{ "panto":
{ "lat": 51.0070, "lng": -0.0020, end: "00:00:25.000" }
},
{ "moveto":
{ "lat": 51.0130, "lng": -0.0015, "path": "drone1" }
},
{ "lineto":
{ "lat": 51.0090, "lng": -0.0017, "path": "drone1",
"end": "00:00:10.000" }
}
]
{ "panto":
{ "lat": 51.0070, "lng": -0.0020, end: "00:00:25.000" }
}
{ "moveto":
{ "lat": 51.0130, "lng": -0.0015, "path": "drone1" }
}
{ "lineto":
{ "lat": 51.0090, "lng": -0.0017, "path": "drone1",
"end": "00:00:10.000" }
}

NOTE Safety zone

00:00:05.000 --&gt; 00:00:10.000
[
{ "circle":
{ "lat": 51.0130, "lng": -0.0015, "rad": 10,
"animate":
[ { "name": "lat", "to": 51.0090, "end": "00:00:10.000" },
{ "name": "lng", "to": -0.0017, "end": "00:00:10.000" }
]
}
{ "circle":
{ "lat": 51.0130, "lng": -0.0015, "rad": 10,
"animate":
[ { "name": "lat", "to": 51.0090, "end": "00:00:10.000" },
{ "name": "lng", "to": -0.0017, "end": "00:00:10.000" }
]
}
]
}

NOTE Drone arrives at (51.0090, -0.0017)

00:00:10.000 --&gt;
[
{ "lineto":
{ "lat": 51.0070, "lng": -0.0020, "path": "drone1", "end": "00:00:25.000" }
},
{ "circle":
{ "lat": 51.0090, "lng": -0.0017, "rad": 10,
"animate":
[ { "name": "lat", "to": 51.0070, "end": "00:00:25.000" },
{ "name": "lng", "to": -0.0020, "end": "00:00:25.000" }
]
}
{ "lineto":
{ "lat": 51.0070, "lng": -0.0020, "path": "drone1", "end": "00:00:25.000" }
}
{ "circle":
{ "lat": 51.0090, "lng": -0.0017, "rad": 10,
"animate":
[ { "name": "lat", "to": 51.0070, "end": "00:00:25.000" },
{ "name": "lng", "to": -0.0020, "end": "00:00:25.000" }
]
}
]
}

NOTE Drone ends at (51.0070, -0.0020)
</pre>
Expand Down Expand Up @@ -755,10 +725,10 @@ <h2>WebVMT File Structure</h2>
</li>
<ul>
<li>
A single <a>WebVMT media definition block</a>.
A <a>WebVMT media definition block</a>.
</li>
<li>
A single <a>WebVMT map initialisation block</a>.
A <a>WebVMT map initialisation block</a>.
</li>
<li>
Zero or more <a>WebVMT style block</a>s and <a>WebVMT comment block</a>s separated from each other by one or more <a>WebVMT line terminator</a>s.
Expand Down Expand Up @@ -986,7 +956,7 @@ <h2>WebVMT Cue Payload</h2>
<dfn>WebVMT metadata text</dfn> consists of any sequence of zero or more characters other than U+000A LINE FEED (LF) characters and U+000D CARRIAGE RETURN (CR) characters, each optionally separated from the next by a <a>WebVMT line terminator</a>. (In other words, any text that does not have two consecutive <a>WebVMT line terminator</a>s and does not start or end with a <a>WebVMT line terminator</a>.)
</p>
<p>
The string represents a <a data-cite='ECMA-404'>JSON text</a> for a <a>WebVMT command list</a>; the requirements given in the relevant JSON specifications apply.
The string represents a <a>WebVMT command list</a>.
</p>
<p>
<a>WebVMT metadata text</a> cues are only useful for scripted applications (e.g. using the <code>metadata</code> text track kind in a HTML text track).
Expand Down Expand Up @@ -1071,7 +1041,7 @@ <h2>WebVMT Media Settings</h2>
<section>
<h2>WebVMT Map Settings</h2>
<p>
The <dfn>WebVMT map settings list</dfn> consists of zero or more of the following components, in any order, separated from each other by one or more U+0020 SPACE characters, U+0009 CHARACTER TABULATION (tab) characters, or </a>WebVMT line terminator</a>s, except that the string must not contain two consecutive <a>WebVMT line terminator</a>s. Each component must not be included more than once per <a>WebVMT map settings list</a> string.
The <dfn>WebVMT map settings list</dfn> consists of zero or more of the following components, in any order, separated from each other by one or more U+0020 SPACE characters, U+0009 CHARACTER TABULATION (tab) characters, or <a>WebVMT line terminator</a>s, except that the string must not contain two consecutive <a>WebVMT line terminator</a>s. Each component must not be included more than once per <a>WebVMT map settings list</a> string.
</p>
<ul>
<li>
Expand Down Expand Up @@ -1211,7 +1181,7 @@ <h2>WebVMT Map Settings</h2>
<section>
<h2>WebVMT Commands</h2>
<p>
A <dfn>WebVMT command list</dfn> consists of a <a data-cite='ECMA-404'>JSON text</a> representing one <a data-cite='ECMA-404'>JSON array</a> consisting of one or more of the following components in any order:
A <dfn>WebVMT command list</dfn> consists of one or more of the following components in any order, separated from each other by a <a>WebVMT line terminator</a>:
<ul>
<li>
A <a>WebVMT map control command</a>.
Expand Down Expand Up @@ -1425,7 +1395,7 @@ <h2>WebVMT Shape Commands</h2>
</ul>
</p>
<p>
A <dfn>WebVMT vertices list</dfn> consists of a <a data-cite='ECMA-404'>JSON text</a> representing a single <a data-cite='ECMA-404'>JSON array</a> consisting of three or more <a data-cite='ECMA-404'>JSON object</a>s each representing a <a>WebVMT location attribute list</a>.
A <dfn>WebVMT vertices list</dfn> consists of a <a data-cite='ECMA-404'>JSON text</a> representing a <a data-cite='ECMA-404'>JSON array</a> consisting of three or more <a data-cite='ECMA-404'>JSON object</a>s each representing a <a>WebVMT location attribute list</a>.
</p>
<p class='note' title='Polygon Vertices'>
Components of a <a>WebVMT vertices list</a> are listed in consecutive order around the perimeter of the polygon. The last vertex should not repeat the value of the first, as this is implicit.
Expand Down Expand Up @@ -1534,7 +1504,7 @@ <h2>WebVMT Animation Subcommand</h2>
The <a>WebVMT animation subcommand</a> refers to the attributes of its parent command.
</p>
<p>
A <dfn>WebVMT animation list</dfn> consists of a <a data-cite='ECMA-404'>JSON text</a> representing a single <a data-cite='ECMA-404'>JSON array</a> consisting of one or more <a>WebVMT animation parameter list</a>s.
A <dfn>WebVMT animation list</dfn> consists of a <a data-cite='ECMA-404'>JSON text</a> representing a <a data-cite='ECMA-404'>JSON array</a> consisting of one or more <a>WebVMT animation parameter list</a>s.
</p>
<p>
A <dfn>WebVMT animation parameter list</dfn> consists of a <a data-cite='ECMA-404'>JSON text</a> representing a <a data-cite='ECMA-404'>JSON object</a> consisting of the following components in any order:
Expand Down Expand Up @@ -1655,24 +1625,24 @@ <h2>WebVMT File Using Only Nested Cues</h2>
NOTE Required non-cue blocks omitted for clarity

00:00.000 --> 01:24.000
[ { "circle": { "lat": 0, "lng": 0, "rad": 2000 } } ]
{ "circle": { "lat": 0, "lng": 0, "rad": 2000 } }

00:00.000 --> 00:44.000
[ { "moveto": { "lat": 0, "lng": 0, "path": "cam1" } },
{ "lineto": { "lat": 0.12, "lng": 0.34, "path": "cam1" } } ]
{ "moveto": { "lat": 0, "lng": 0, "path": "cam1" } }
{ "lineto": { "lat": 0.12, "lng": 0.34, "path": "cam1" } }

00:44.000 --> 01:19.000
[ { "lineto": { "lat": 0.56, "lng": 0.78, "path": "cam1" } } ]
{ "lineto": { "lat": 0.56, "lng": 0.78, "path": "cam1" } }

01:24.000 --> 05:00.000
[ { "circle": { "lat": 0, "lng": 0, "rad": 30000 } } ]
{ "circle": { "lat": 0, "lng": 0, "rad": 30000 } }

01:35.000 --> 03:00.000
[ { "moveto": { "lat": 0.87, "lng": 0.65, "path": "cam2" } },
{ "lineto": { "lat": 0.43, "lng": 0.21, "path": "cam2" } } ]
{ "moveto": { "lat": 0.87, "lng": 0.65, "path": "cam2" } }
{ "lineto": { "lat": 0.43, "lng": 0.21, "path": "cam2" } }

03:00.000 --> 05:00.000
[ { "lineto": { "lat": 0, "lng": 0, "path": "cam2" } } ]
{ "lineto": { "lat": 0, "lng": 0, "path": "cam2" } }
</pre>
<p>
Notice how you can express the cues in this WebVMT file as a tree structure:
Expand Down Expand Up @@ -1710,12 +1680,12 @@ <h2>WebVMT File Using Only Nested Cues</h2>
NOTE Required non-cue blocks omitted for clarity

00:00.000 --> 01:00.000
[ { "moveto": { "lat": 0.12, "lng": 0.34, "path": "cam3" } },
{ "lineto": { "lat": 0.56, "lng": 0.78, "path": "cam3" } } ]
{ "moveto": { "lat": 0.12, "lng": 0.34, "path": "cam3" } }
{ "lineto": { "lat": 0.56, "lng": 0.78, "path": "cam3" } }

00:30.000 --> 01:30.000
[ { "moveto": { "lat": 0.87, "lng": 0.65, "path": "cam4" } },
{ "lineto": { "lat": 0.43, "lng": 0.21, "path": "cam4" } } ]
{ "moveto": { "lat": 0.87, "lng": 0.65, "path": "cam4" } }
{ "lineto": { "lat": 0.43, "lng": 0.21, "path": "cam4" } }
</pre>
<p>
In this ninety-second example, the two cues partly overlap, with the first ending before the second ends and the second starting before the first ends. This therefore is not a <a>WebVMT file using only nested cues</a>.
Expand Down

0 comments on commit 68f00a3

Please sign in to comment.