Bug 56145 - [Qt] Seeking videos using the timeline bar does not work properly and stop the video playback.
Summary: [Qt] Seeking videos using the timeline bar does not work properly and stop th...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P1 Blocker
Assignee: Alexis Menard (darktears)
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2011-03-10 14:18 PST by Alexis Menard (darktears)
Modified: 2011-05-04 12:59 PDT (History)
4 users (show)

See Also:


Attachments
Patch to fix the issue (5.60 KB, patch)
2011-03-10 14:29 PST, Alexis Menard (darktears)
vestbo: review-
Details | Formatted Diff | Diff
V2 with comments taken into account. (5.81 KB, patch)
2011-03-14 07:47 PDT, Alexis Menard (darktears)
vestbo: review-
vestbo: commit-queue-
Details | Formatted Diff | Diff
V3 without the play. (5.56 KB, patch)
2011-03-14 12:22 PDT, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff
V4 with up-to-date changelog (5.41 KB, patch)
2011-03-14 12:34 PDT, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Menard (darktears) 2011-03-10 14:18:57 PST
- Go to tiny.cc/wkmedia and start playback of one of the video.

- Try to seek somewhere. On Linux the seeking is really strange sometimes going back to the value we were before the seek. On Mac for instance the playback stops.
Comment 1 Alexis Menard (darktears) 2011-03-10 14:29:04 PST
Created attachment 85390 [details]
Patch to fix the issue

We do not need seekTimeout and queuedSeekTimeout anymore. setPosition on QMediaPlayer is good enough. positionChanged() will be emitted when the data is buffered. On Linux the signal was not emitted because of a bug in QtMultimedia. Also we need to resume the playback after receiving positionChanged() because beginScrubbing() actually paused the mediaplayer previously.

A patch has been send to the Qt Multimedia team for review.
Comment 2 Tor Arne Vestbø 2011-03-14 06:26:42 PDT
Comment on attachment 85390 [details]
Patch to fix the issue

as discussed on irc we need to exit early on state-change when seeking so that play/pause changes are not reflected as DOM events
Comment 3 Alexis Menard (darktears) 2011-03-14 07:47:00 PDT
Created attachment 85673 [details]
V2 with comments taken into account.
Comment 4 Tor Arne Vestbø 2011-03-14 07:52:43 PDT
Comment on attachment 85673 [details]
V2 with comments taken into account.

View in context: https://bugs.webkit.org/attachment.cgi?id=85673&action=review

r=me with comment

> Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp:448
> +        if (m_mediaPlayer->state() != QMediaPlayer::PlayingState) {

This needs to check the webcorePlayer state
Comment 5 Tor Arne Vestbø 2011-03-14 08:05:46 PDT
Comment on attachment 85673 [details]
V2 with comments taken into account.

r-, there's logic in HTMLMEdiaElement that should take care of the play() for us
Comment 6 Alexis Menard (darktears) 2011-03-14 12:22:45 PDT
Created attachment 85700 [details]
V3 without the play.

Resuming the playback should be handled a layer up so I removed the play() call. It's a separate patch that I will upload after on a separate bug report. This commit then still fix the seeking but the video keep being paused after a successful seek.
Comment 7 Alexis Menard (darktears) 2011-03-14 12:34:13 PDT
Created attachment 85702 [details]
V4 with up-to-date changelog
Comment 8 WebKit Commit Bot 2011-03-14 22:59:34 PDT
Comment on attachment 85702 [details]
V4 with up-to-date changelog

Clearing flags on attachment: 85702

Committed r81114: <http://trac.webkit.org/changeset/81114>
Comment 9 WebKit Commit Bot 2011-03-14 22:59:40 PDT
All reviewed patches have been landed.  Closing bug.