tested with webkitgtk (Changeset 172150) w/ linux(64Bit) regression seems to come from http://trac.webkit.org/changeset/163871 The MediaPlayerPrivateGstreamer implementation is rounding (to integer) the playback rate, therefore slow motion is not working. e.g. set playback rate to 0.5 will actually change to rate to 0. The issue can be tested using very basic page such as : http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_av_prop_playbackrate With firefox / chromium, if we start the video then click on "Set video to play in slow motion", it will actually play slow motion (rate = 0.5) With webkit-gtk, video is paused (even if reported playback rate is 0.5). The issue comes from clampTo (template) function void MediaPlayerPrivateGStreamer::setRate(float rate) { // Higher rate causes crash. rate = clampTo(rate, -20, 20); -20, 20 are integers, therefore I guess returned value is also an integer - based on MathExtras.h anyway clampTo(0.5, -20, 20) returns 0 The issue can be fixed using float-friendly clampTo version: rate = clampTo(rate, -20.0, 20.0); (clampTo(0.5, -20.0, 20.0) returns 0.5 as expected)
Thanks for investigating this issue! Would you mind providing a patch? The whole procedure is explained there: http://www.webkit.org/coding/contributing.html Handy documentation if it's the first WebKit patch you're contributing.
Created attachment 236431 [details] Patch
Comment on attachment 236431 [details] Patch Thanks!
I think I can add a regression test, the wrong playback rate cannot be detected in javascript but I could write a simple test check to if we reach EOS while in slow motion (e.g.playRate = 0.5) If the actual gstreamer rate is 0 we will never get the ended event. What do you think ?
(In reply to comment #4) > I think I can add a regression test, the wrong playback rate cannot be detected in javascript but I could write a simple test check to if we reach EOS while in slow motion (e.g.playRate = 0.5) > If the actual gstreamer rate is 0 we will never get the ended event. > What do you think ? Hum yeah that could work indeed. Before setting the playback rate I advise to perform a seek near the end of the file so the test runs faster :)
Created attachment 236440 [details] Patch
FYI LayoutTests/media/video-ended-event-slow-motion-playback.html is based on LayoutTests/media/video-ended-event-negative-playback.html, but position is set near the end of the media and playback rate is set to 0.5 (and loop attribute is removed)
If you can't land this patch yourself we can use the commit-queue bot. Let me know :)
Comment on attachment 236440 [details] Patch Rejecting attachment 236440 [details] from commit-queue. fvallee@connected-labs.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/contributors.json. - If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags. - If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/contributors.json by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights.
seems I can't land it myself ;) patch has "commit-queue?" flag now. Thanks for the review anyway
Comment on attachment 236440 [details] Patch Clearing flags on attachment: 236440 Committed r172472: <http://trac.webkit.org/changeset/172472>
All reviewed patches have been landed. Closing bug.