Implement Danmu (Comment) Segment Loading
masterForwardWidget supports on-demand loading of danmu segments for long videos. To use this, declare modules in WidgetMetadata.modules with type: "danmu".
Required Module IDs
searchDanmu: Search for danmu resources by title.getCommentsById: Fetch segment information (often from a cache or server).getDanmuWithSegmentTime: (Optional) Fetch danmu for a specific playback timestamp.
Supported Response Formats
Format 1 (Object-based):
[{ "p": "attributes", "m": "content", "cid": "id" }]Format 2 (Array-based):
[[time, position, color, extra, "content"]]// Example Danmu Module Config
modules: [
{ id: "searchDanmu", title: "Search Danmu", functionName: "searchDanmu", type: "danmu", params: [] },
{ id: "getComments", title: "Get Danmu", functionName: "getCommentsById", type: "danmu", params: [] }
]