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()">
More TIY examples are at the bottom of the page.
Syntax
In HTML:
<element onseeked="myScript">
In JavaScript:
object.onseeked = function(){myScript};
In JavaScript, use the addEventListener() method:
object.addEventListener("seeked", myScript);
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()">
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; }
Mifano
Kutumia JavaScript kwenye matukio ya kumaliza uharibifu/kuharibifu kwa mawingu mpya ya audio:
<audio onseeked="myFunction()">