IVSPlayerDelegate
Objective-C
@protocol IVSPlayerDelegate <NSObject>Swift
protocol Delegate : NSObjectProtocolThis delegate receives state changes and other events relevant to playback on IVSPlayer. All are invoked on the main queue.
- 
                  
                  Duration of the media changed. See IVSPlayer.duration, which supports Key-Value Observation as an alternative to this delegate method.DeclarationObjective-C - (void)player:(nonnull IVSPlayer *)player didChangeDuration:(CMTime)duration;Swift optional func player(_ player: IVSPlayer, didChangeDuration duration: CMTime)ParametersplayerThe player instance managing the media that changed duration. durationThe new duration. 
- 
                  
                  State of the player changed. See IVSPlayer.state, which supports Key-Value Observation as an alternative to this delegate method.DeclarationObjective-C - (void)player:(nonnull IVSPlayer *)player didChangeState:(IVSPlayerState)state;Swift optional func player(_ player: IVSPlayer, didChangeState state: Any!)ParametersplayerThe player instance that changed state. stateThe new state. 
- 
                  
                  The player encountered a fatal error. See IVSPlayer.error, which supports Key-Value Observation as an alternative to this delegate method.DeclarationObjective-C - (void)player:(nonnull IVSPlayer *)player didFailWithError:(nonnull NSError *)error;Swift optional func player(_ player: IVSPlayer, didFailWithError error: Error)ParametersplayerThe player instance that encountered an error. errorThe error. See IVSErrors.h for expected userInfo keys. 
- 
                  
                  The playback quality changed. This may be due to user action or an internal adaptive-quality switch. See IVSPlayer.quality, which supports Key-Value Observation as an alternative to this delegate method.DeclarationObjective-C - (void)player:(nonnull IVSPlayer *)player didChangeQuality:(nullable IVSQuality *)quality;Swift optional func player(_ player: IVSPlayer, didChangeQuality quality: IVSQuality?)ParametersplayerThe player instance that switched quality. qualityThe new quality. 
- 
                  
                  The player encountered a timed cue such as subtitles, captions, or other metadata in the stream. See IVSCueSee IVSTextCueDeclarationParametersplayerThe player instance managing the stream. cueAn object with timing information and other details varying by type. 
- 
                  
                  The player exhausted its internal buffers while playing. This is not invoked for user actions such as seeking or starting/resuming playback. DeclarationObjective-C - (void)playerWillRebuffer:(nonnull IVSPlayer *)player;Swift optional func playerWillRebuffer(_ player: IVSPlayer)ParametersplayerThe player instance that will rebuffer. 
- 
                  
                  The native video size for the media changed. See IVSPlayer.videoSize, which supports Key-Value Observation as an alternative to this delegate method.DeclarationObjective-C - (void)player:(nonnull IVSPlayer *)player didChangeVideoSize:(CGSize)videoSize;Swift optional func player(_ player: IVSPlayer, didChangeVideoSize videoSize: CGSize)ParametersplayerThe player instance managing the media that changed. videoSizeThe new size in pixels. 
 IVSPlayerDelegate Protocol Reference
        IVSPlayerDelegate Protocol Reference