Skip to content

ChapterInfo

chapterList() 返回的章节数据结构。

字段

字段类型必填说明
namestring章节名
urlstring章节 URL
groupstring分组名(视频多线路时使用)

基本示例

js
return [
  { name: '第1章 初入学院', url: 'https://example.com/chapter/1' },
  { name: '第2章 修炼开始', url: 'https://example.com/chapter/2' },
  { name: '第3章 突破', url: 'https://example.com/chapter/3' }
];

视频多线路

js
return [
  { name: '第01集', url: 'https://play1.com/ep1.m3u8', group: '线路1' },
  { name: '第02集', url: 'https://play1.com/ep2.m3u8', group: '线路1' },
  { name: '第01集', url: 'https://play2.com/ep1.m3u8', group: '线路2' },
  { name: '第02集', url: 'https://play2.com/ep2.m3u8', group: '线路2' }
];

排序要求

返回的数组必须正序排列(第一章/第一集在前)。

基于 MIT 许可发布