Setting .currentTime of HTMLVideoElement within canplay handler dispatches pause event
Reported by
guest271...@gmail.com,
Sep 20 2017
|
|||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/60.0.3112.113 Chrome/60.0.3112.113 Safari/537.36
Steps to reproduce the problem:
1. Set src of <video> element to a media fragment identifier, for example #t=10,11
2. Within canplay event handler set .currentTime to 10.5
3. Call .play()
What is the expected behavior?
1. .currentTime should be set to 10.5
2. Playback should begin at the set .currentTime of 10.5 when .play() is called
What went wrong?
1. pause event is dispatched
2. Playback does not begin when .play() is called
Did this work before? N/A
Does this work in other browsers? N/A
Chrome version: 60.0.3112.113 Channel: n/a
OS Version:
Flash Version:
Code to reproduce issue:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<video preload="auto" controls></video>
<span></span>
<script>
const url = "https://mirrors.creativecommons.org/movingimages/webm/ScienceCommonsJesseDylan_240p.webm#t=10,15";
const video = document.querySelector("video");
let cursor = 10.5;
video.oncanplay = e => {
video.oncanplay = null;
video.currentTime = cursor;
console.log(e, video.currentTime, video.buffered.end(0));
video.play().catch(err => document.querySelector("span").textContent = err.message);
}
video.onpause = e => {
console.log(e, video.currentTime);
video.play()
}
video.src = url;
</script>
</body>
</html>
,
Oct 6 2017
I can reproduce this on M60.
,
Oct 12
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||
►
Sign in to add a comment |
|||
Comment 1 by manoranj...@chromium.org
, Sep 20 2017