Returns the BufferLevel for the chosen buffer type and media type of the active Source. Returns a BufferLevel where BufferLevel.level and BufferLevel.targetLevel is 0.0 if there is no active playback session.
Example:
mkplayer.buffer.getLevel(MKBufferType.BackwardDuration, MKMediaType.Video)
the buffer type for which to get the buffer level for.
the media type for which to get the buffer level for.
Sets the target buffer level for the chosen buffer type across all media types. The set target buffer levels persist across playback sessions.
Example:
mkplayer.buffer.setTargetLevel(MKBufferType.ForwardDuration, requiredLevel)
The buffer type to change the target buffer level for.
The value to set.
The media type to change the target buffer level for.
Buffer Level refers to the amount of media data (audio, video) that has been preloaded and stored in the buffer of a media player relative to the current playback position. This includes both the forward buffer level, which is the duration or amount of media data buffered ahead of the current playback position and the backward buffer level, which is the duration or amount of media data buffered behind the current playback position. This measure indicates the readiness of the player to continue playing without interruption due to the need to fetch additional data from the source.