RESOLVED FIXED 150348
Media "ended" event incorrectly fires when currentTime is set
https://bugs.webkit.org/show_bug.cgi?id=150348
Summary Media "ended" event incorrectly fires when currentTime is set
Andrew Leung
Reported 2015-10-19 17:31:07 PDT
Created attachment 263535 [details] Sample HTML page with an externally-linked audio file to demonstrate the bug The Media "ended" event appears to fire incorrectly when the currentTime property is altered after the media has ended playback. When that happens, the event does not fire properly again until after the playback ends a second time. I attached a sample HTML file to demonstrate the issue. Steps to reproduce: 1. On a page that has a video/audio element, attach an "ended" event listener 2. In the event handler, alert a message 3. In the event handler, sets the currentTime property to 0 4. Play the video/audio until it ends 5. Play the video/audio a second time until it ends Expected results: The message should be alerted only once every time the playback ends. Actual results: The message gets alerted twice at the end of the first playback. The message does not get alerted at all at the end of the second playback. Tested browsers: Safari 8.0.8 on OS X 10.10.5 -- NOT affected Safari 9.0 on OS X 10.10.5 -- affected Safari 9.0 on OS X 10.11 -- affected WebKit r191315 on OS X 10.10.5 -- affected MobileSafari on iOS 8.4.1 -- NOT affected MobileSafari on iOS 9.0.2 -- affected
Attachments
Sample HTML page with an externally-linked audio file to demonstrate the bug (631 bytes, text/html)
2015-10-19 17:31 PDT, Andrew Leung
no flags
Proposed patch. (4.73 KB, patch)
2016-01-25 08:04 PST, Eric Carlson
no flags
Radar WebKit Bug Importer
Comment 1 2016-01-19 15:49:18 PST
Eric Carlson
Comment 2 2016-01-25 08:04:21 PST
Created attachment 269751 [details] Proposed patch.
WebKit Commit Bot
Comment 3 2016-01-25 09:55:26 PST
Comment on attachment 269751 [details] Proposed patch. Clearing flags on attachment: 269751 Committed r195540: <http://trac.webkit.org/changeset/195540>
WebKit Commit Bot
Comment 4 2016-01-25 09:55:31 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.