onseek Event

This example demonstrates how to use the onseek event. The onseek event fires when either the seekTo, seekToFrame or seekActiveTime method is called on a media object. Before validating and implementing the value to seek, make sure the object is active to avoid generating an error message. In this example, if the object is not active the beginElement method is called to restart the object, followed by the request to seek.

Choose a method to use from the drop-down menu and enter a value in the input box. Click the button labelled 'Click to seek'. The media object will seek to the value entered and pause. Click the 'Resume' button to resume the video from that point.


Media timer: 0



Choose method: 
Time value to seek in object's timeline:  seconds


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.