JWChaptersDelegate

@objc
public protocol JWChaptersDelegate

A protocol for listening to chapter events.

These events are triggered by the time values specified within the chapter media track VTT file. In order for the chapter beginning and ending events to be as accurate as possible, it is advisable that the chapter media track file define the chapters with accurate beginning and ending time values.

  • Reports when the player has loaded the chapter cues.

    Declaration

    Swift

    func jwplayer(_ player: JWPlayer, loadedChapters chapters: [JWCue])

    Parameters

    player

    The player emitting the event.

    chapters

    The chapters belonging to the current media.

  • Reports when the player has entered a chapter.

    Declaration

    Swift

    func jwplayer(_ player: JWPlayer, beganChapter chapter: JWCue)

    Parameters

    player

    The player emitting the event.

    chapter

    The description of the chapter which is beginning.

  • Reports when the player has progressed past the end of a chapter.

    Declaration

    Swift

    func jwplayer(_ player: JWPlayer, endedChapter chapter: JWCue)

    Parameters

    player

    The player emitting the event.

    chapter

    The description of the chapter which is ending.