Bug 219490
| Summary: | [GStreamer] Seek on loadedmetadata is ignored | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Alicia Boya García <aboya> |
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | bugs-noreply, fjimenez |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Alicia Boya García
I was writing a test for an unrelated bug when I found this.
const eventWatcher = new EventWatcher(test, video, ["loadedmetadata", "seeked", "ended"]);
await eventWatcher.wait_for("loadedmetadata");
assert_equals(video.videoWidth, 320, "width when the video is loaded");
assert_equals(video.videoHeight, 240, "height when the video is loaded");
video.currentTime = 5;
video.play();
await eventWatcher.wait_for(["seeked", "ended"]);
You would expect the video to start playing on t=5, but it starts on t=0 instead. That's a bug.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alicia Boya García
This is in regular playback from an HTTP resource (not MSE).
Fernando Jiménez Moreno
I am not sure if this is exactly what you meant, but a test like this works for me:
```
const video = document.querySelector('video');
video.addEventListener('loadedmetadata', event => {
console.log('onloadedmetadata received');
console.log('Seeking to t=15');
video.currentTime = 15;
video.play();
});
video.addEventListener('seeked', event => {
console.log('Seek received');
});
```
The logs are properly shown and video starts at t=15 (if autoplay is allowed)