The following section describes the way to play a video while the application is minimized, for example in the case of listening to a podcast in the background. The framework observes application state changes internally to provide handling for this scenario.
- Enabling your application to play audible content while in the background. To enable your application to play audible content while in the background, enable this option in the application background modes section or info.plist.
- Setting the audio session category. To continue playing media while in the background, you must set an audio session category with background playback (for example: AVAudioSessionCategoryPlayback).
Special considerations for video media. If the current item is displaying video, playback of the player is automatically paused when the application is sent to the background. To prevent this pause from occurring, you’ll need to set the player of an AVPlayerLayer to nil.
Note: For more information about playing media while the application runs in the background see the Apple Developer Site.
Connectivity changes are observed internally to provide better handling when no network connection is available.
Whenever network reachability changes, an error event will be sent with an NSError inside.
The player begins listening to changes when starting to load the asset, and stops when the player is deinitialized.
If more than one player is used, the network reachability notifications will stop only after all of the players are deinitialized.
To observe errors (not just reachability), add an observer for error type and use the error accessor on the event.
Check out the Kaltura Player SDK Forum page for different ways of getting in touch.