Skip to content

Commit 08b3f68

Browse files
committed
feat: add new interactive cue types to example
This commit introduces new interactive cue types to the example in `examples/index.tsx`. Specifically, it adds: - A 'choice-video-segment-change' cue type for branching video segments. - A 'text' cue type for collecting user input.
1 parent 621a7c9 commit 08b3f68

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

examples/index.tsx

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,41 @@ const App = () => {
1515
}}
1616
cues={[
1717
{
18-
id: 'cue1',
18+
id: 'segmentChange',
19+
time: 10,
20+
label: 'Segment Change',
21+
payload: {
22+
interaction: {
23+
type: 'choice-video-segment-change',
24+
title: 'Choose your path',
25+
description: 'Select a video segment to jump to.',
26+
question: 'Where would you like to go?',
27+
options: [
28+
{
29+
level: 'Segment A',
30+
video:
31+
'https://interactive-video-labs.github.io/assets/sample-interaction-1.mp4',
32+
},
33+
{
34+
level: 'Segment B',
35+
video:
36+
'https://interactive-video-labs.github.io/assets/sample-interaction-2.mp4',
37+
},
38+
],
39+
},
40+
},
41+
},
42+
{
43+
id: 'question2',
1944
time: 2,
45+
label: 'Question 2',
2046
payload: {
21-
type: 'quiz',
22-
question: 'What is the capital of France?',
23-
answers: ['Paris', 'London', 'Berlin', 'Madrid'],
47+
interaction: {
48+
type: 'text',
49+
title: 'Your Information',
50+
description: 'Please enter your name below.',
51+
question: 'Your name?',
52+
},
2453
},
2554
},
2655
]}

0 commit comments

Comments
 (0)