IWMPNetwork::bufferingCount property
[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The bufferingCount property gets the number of times buffering occurred during playback.
Syntax
public System.Int32 bufferingCount {get; set;}
Public ReadOnly Property bufferingCount As System.Int32
Property value
A System.Int32 that is the buffering count.
Remarks
Each time playback is stopped and restarted, this property is reset to zero. It is not reset if playback is paused.
Buffering applies only to streaming content. This property gets valid information only during run time when the URL for playback is set by using the AxWindowsMediaPlayer.URL property.
Examples
The following example uses bufferingCount to display the number of times buffering occurs during playback. The information is displayed in a label in response to the Buffering Event. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.
// Add a delegate for the Buffering event.
player.Buffering += new AxWMPLib._WMPOCXEvents_BufferingEventHandler(player_Buffering);
// Create an event handler for the Buffering event.
private void player_Buffering(object sender, AxWMPLib._WMPOCXEvents_BufferingEvent e)
{
// Display the bufferingCount when buffering has started.
if (e.start == true)
{
bufferingCountLabel.Text = ("Buffering count: " + player.network.bufferingCount);
}
}
' Create an event handler for the Buffering event.
Public Sub player_Buffering(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_BufferingEvent) Handles player.Buffering
' Display the bufferingCount when buffering has started.
If (e.start = True) Then
bufferingCountLabel.Text = ("Buffering count: " + player.network.bufferingCount)
End If
End Sub
Requirements
Requirement | Value |
---|---|
Version |
Windows Media Player 9 Series or later |
Namespace |
WMPLib |
Assembly |
|