Tukio onseeked

Utafiti na matumizi

Kwa sababu ya kuweza kuweka kikabla cha audio/video kipya kama ukiingia kwenye kiwango kilichotengwa, tukio onseeked husababishwa.

Mwongozo:Tukio onseeked na Matukio ya onseekingInapungua.

Mwongozo:Tumia kwa sababu ya uadilifu wa kiumeji/vidio Jina la currentTimeGet the current playback position.

Mifano

Execute JavaScript when the user finishes moving/jumping to a new position in the video:

<video onseeked="myFunction()">

Jifunze kwa urahisi

More TIY examples are at the bottom of the page.

Syntax

In HTML:

<element onseeked="myScript">

Jifunze kwa urahisi

In JavaScript:

object.onseeked = function(){myScript};

Jifunze kwa urahisi

In JavaScript, use the addEventListener() method:

object.addEventListener("seeked", myScript);

Jifunze kwa urahisi

Note:Internet Explorer 8 or earlier versions do not support addEventListener() method.

Technical details

Bubbling: Not supported
Cancellable: Not supported
Event type: Event
Supported HTML tags: <audio> and <video>
DOM version: Level 3 Events

Browser support

The numbers in the table indicate the first browser version that fully supports this event.

Event Chrome IE Firefox Safari Opera
onseeked Support 9.0 Support Support Support

More examples

Mifano

This example demonstrates the difference between onseeking and onseeked events:

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

Jifunze kwa urahisi

Mifano

When the user finishes moving/jumping to a new position, use the Video object's currentTime property to display the current playtime position:

// Get the <video> element with id="myVideo"
var x = document.getElementById("myVideo");
// Attach a seeked event to <video> to execute a function when a seek operation is completed
x.addEventListener("seeked", myFunction); 
function myFunction() {
  // In element with id="demo" <p> show the current position of the video
  document.getElementById("demo").innerHTML = x.currentTime; 
}

Jifunze kwa urahisi

Mifano

Kutumia JavaScript kwenye matukio ya kumaliza uharibifu/kuharibifu kwa mawingu mpya ya audio:

<audio onseeked="myFunction()">

Jifunze kwa urahisi