Network.sourceProtocol

[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 sourceProtocol property retrieves the source protocol used to receive data.

Syntax

player.network.sourceProtocol

Possible Values

This property is a read-only String.

Remarks

This property is set to "" (empty string) when playing media from a CD or DVD.

Examples

The following JScript example uses Network.sourceProtocol to display the source protocol used to receive data. The information is displayed in an HTML DIV created with ID = "SP". The Player object was created with ID = "Player".

<!-- Create an event handler for play state change. -->
<SCRIPT FOR = Player EVENT = PlayStateChange(NewState)>
   if (3 == NewState){
     SP.innerHTML = "Source protocol: " + Player.network.sourceProtocol;
   }
</SCRIPT>

Requirements

Requirement Value
Version
Windows Media Player version 7.0 or later.
DLL
Wmp.dll

See also

Network Object