Network.receptionQuality
[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 receptionQuality property retrieves the percentage of packets received in the last 30 seconds.
Syntax
player.network.receptionQuality
Possible Values
This property is a read-only Number (long).
Remarks
The number of packets received, lost, and recovered during streaming is monitored once every second. receptionQuality is the percentage of packets not lost during the last 30 seconds.
Each time playback is stopped and restarted, this property is set to zero. It is not reset if playback is paused.
This property returns valid information only during run time and only if the Player.URL property is also set.
Examples
The following JScript example uses Network.receptionQuality to display the percentage of packets received. The information is displayed in an HTML DIV created with ID = "RQ". The example uses a timer with a 30-second interval to update the display. The Player object was created with ID = "Player".
<!-- Create an event handler for play state change. -->
<SCRIPT FOR = Player EVENT = PlayStateChange(NewState)>
var idI; // Variable for the interval id.
// Test whether content is playing.
if (3 == NewState){
// Start the timer. Update the display every 30 seconds.
idI = window.setInterval("UpdateRQ()", 30000);
}
else{
// Not playing; stop the timer.
window.clearInterval(idI);
}
</SCRIPT>
<!-- Put the function to update the display in a separate code block. -->
<SCRIPT>
function UpdateRQ(){
RQ.innerHTML = "";
RQ.innerHTML = "Reception quality: " + Player.network.receptionQuality;
RQ.innerHTML += "%";
}
</SCRIPT>
Requirements
Requirement | Value |
---|---|
Version |
Windows Media Player version 7.0 or later. |
DLL |
|