Windows Media Player 11 SDK IWMPNetwork.bufferingCount (VB and C#)
Previous | Next |
IWMPNetwork.bufferingCount (VB and C#)
The bufferingCount property gets the number of times buffering occurred during playback.
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.
Example Code
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.
' 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
FakePre-caafbe3f0025494291301af890a047b5-bd2aabbd166f47b7b60c4cb5631dee87
// 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); } }
Requirements
Version: Windows Media Player 9 Series or later
Namespace: WMPLib
Assembly: Interop.WMPLib.dll (automatically generated by Visual Studio)
See Also
Previous | Next |