Player and Media State

This example traps the onopenstatechange and onplaystatechange events in order to display the player state as it moves through a playlist. As each event fires, the sample updates the display by reading the openstate and playstate properties. Because these properties return an integer, the sample code includes two arrays of text values to make the display information meaningful.



To view the source code, right-click this page and choose View Source from the shortcut menu that appears.

© 2007 Microsoft Corporation. All rights reserved. Terms of use.