Latest web development tutorials

onseeked event

Event Object Reference Event objects

Examples

JavaScript execution after the user to reposition the video playback position:

<Video onseeked = "myFunction ()">

try it"

Bottom of this article contains more examples.


Definition and Usage

onseeked event repositioned user video / audio (audio / video) playback position triggered.

Tip: onseeked event contrary onseeking event.

Tip: Use currentTime to set or return the video / audio (audio / video) playback of the current position.


Browser Support

Figures in the table represent the first browser to support this version of events.

event
onseeked Yes 9.0 Yes Yes Yes


grammar

In HTML:

<Elementonseeked = "myScript"> try

In JavaScript:

object .onseeked = function () {myScript }; try

JavaScript, use the addEventListener () method:

object .addEventListener ( "seeked", myScript ); try

Note: Internet Explorer 8 and earlier versions of IE do not support addEventListener () method.


technical details
Whether to support the bubble: No
It can be canceled: No
Event Type: Event
Supported HTML tags: <Audio>, <video>


Examples

More examples

Examples

The following examples demonstrate the difference between onseeking events and onseeked event:

<Video onseeking = "myFunction ()" onseeked = "mySecondFunction ()">

try it"

Examples

After the user to reposition the video playback position, you can use currentTime property in the Video object to display the current playback position:

// Get id = "myVideo" the <video> element
var x = document.getElementById ( "myVideo");

// If looking to complete, namely <video> add seeked event and perform response functions
x.addEventListener ( "seeked", myFunction);

function myFunction () {
// Display id = "demo" of <p> elements in the current video playback position
. Document.getElementById ( "demo") innerHTML = x.currentTime;
}

try it"

Examples

After the implementation of JavaScript to reposition the audio playback position:

<Audio onseeked = "myFunction ()">

try it"


Event Object Reference Event objects