diff --git a/examples/nextjs-with-typescript/pages/MuxPlayerChapters.tsx b/examples/nextjs-with-typescript/pages/MuxPlayerChapters.tsx
index 7a97e7db..5ab4b4d1 100644
--- a/examples/nextjs-with-typescript/pages/MuxPlayerChapters.tsx
+++ b/examples/nextjs-with-typescript/pages/MuxPlayerChapters.tsx
@@ -1,33 +1,40 @@
import Link from "next/link";
import Head from 'next/head';
-import { useState } from "react";
+import { useCallback, useState } from "react";
import MuxPlayer from "@mux/mux-player-react";
import type MuxPlayerElement from "@mux/mux-player";
type Chapter = { startTime: number; endTime: number; value: string; };
-const chapters: Chapter[] = [
- { startTime: 0, endTime: 3, value: 'Chapter 1' },
- { startTime: 3, endTime: 6, value: 'Chapter 2' },
- { startTime: 6, endTime: 9, value: 'Chapter 3' }
+const exampleChapters: Chapter[] = [
+ { startTime: 0, endTime: 3, value: 'A beginning chapter' },
+ { startTime: 3, endTime: 6, value: 'In the middle' },
+ { startTime: 6, endTime: 9, value: 'Is this the end? (No)' }
];
-function MuxPlayerPage() {
+function MuxPlayerPage({ chapters = exampleChapters }: { chapters: Chapter[] }) {
const [activeChapter, setActiveChapter] = useState
- Active Chapter: Elements
+
Chapters with explicit end times (with gaps)
Unset
-
- -
- - -- -
+++