Proprietà IWMPNetwork::bufferingCount
[La funzionalità associata a questa pagina, Lettore multimediale Windows SDK, è una funzionalità legacy. È stata sostituita da MediaPlayer. MediaPlayer è stato ottimizzato per Windows 10 e Windows 11. Microsoft consiglia vivamente che il nuovo codice usi MediaPlayer anziché Lettore multimediale Windows SDK, quando possibile. Microsoft suggerisce che il codice esistente che usa le API legacy venga riscritto per usare le nuove API, se possibile.
La proprietà bufferingCount ottiene il numero di volte in cui si è verificato il buffering durante la riproduzione.
Sintassi
public System.Int32 bufferingCount {get; set;}
Public ReadOnly Property bufferingCount As System.Int32
Valore proprietà
Oggetto System.Int32 che corrisponde al conteggio del buffering.
Commenti
Ogni volta che la riproduzione viene arrestata e riavviata, questa proprietà viene reimpostata su zero. Non viene reimpostato se la riproduzione viene sospesa.
Il buffering si applica solo al contenuto di streaming. Questa proprietà ottiene informazioni valide solo durante l'esecuzione quando l'URL per la riproduzione viene impostato usando la proprietà AxWindowsMediaPlayer.URL .
Esempio
Nell'esempio seguente viene usato bufferingCount per visualizzare il numero di volte in cui si verifica il buffering durante la riproduzione. Le informazioni vengono visualizzate in un'etichetta in risposta all'evento buffering. L'oggetto AxWMPLib.AxWindowsMediaPlayer è rappresentato dalla variabile denominata 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
Requisiti
Requisito | Valore |
---|---|
Versione |
Lettore multimediale Windows serie 9 o versioni successive |
Spazio dei nomi |
WMPLib |
Assembly |
|
Vedi anche
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per