haikuwebkit/LayoutTests/media/video-fast-seek-expected.txt

24 lines
758 B
Plaintext
Raw Permalink Normal View History

Add support for HTMLMediaElement.fastSeek() https://bugs.webkit.org/show_bug.cgi?id=124262 Reviewed by Eric Carlson. Source/WebCore: Test: media/video-fast-seek.html Add the fastSeek() method to HTMLMediaElement, and use fastSeek() in the JavaScript media controls. Add the new fastSeek() method: * html/HTMLMediaElement.cpp: (HTMLMediaElement::fastSeek): Call seekWithTolerance. (HTMLMediaElement::seek): Call seekWithTolerance with 0 tolerance. (HTMLMediaElement::seekWithTolerance): Renamed from seek(). * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: Add seekWithTolerance() to MediaPlayer: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::seekWithTolerance): Pass to MediaPlayerPrivate. * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::seekWithTolerance): Default implementation which calls seek(). * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::seek): Call seekWithTolerance with 0 tolerance. (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Renamed from seek(). * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Take tolerance parameters. Use the new fastSeek() method while actively scrubbing. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.createControls): Add mouse up and down handlers. (Controller.prototype.handleTimeUpdate): Only update the timeline when not scrubbing. (Controller.prototype.handleTimelineChange): Use fastSeek(). (Controller.prototype.handleTimelineMouseDown): Start scrubbing. (Controller.prototype.handleTimelineMouseUp): Stop scrubbing. LayoutTests: * media/video-fast-seek-expected.txt: Added. * media/video-fast-seek.html: Added. Canonical link: https://commits.webkit.org/142492@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-11-13 18:30:03 +00:00
Test that fastSeek() commands work correctly.
EVENT(canplaythrough)
Seek past the 4th sync sample:
RUN(video.currentTime = 2.5)
EVENT(timeupdate)
EXPECTED (video.currentTime.toFixed(1) == '2.5') OK
Test that fastSeek() past the currentTime will not result in a seek before the currentTime or past the seek time:
Add support for HTMLMediaElement.fastSeek() https://bugs.webkit.org/show_bug.cgi?id=124262 Reviewed by Eric Carlson. Source/WebCore: Test: media/video-fast-seek.html Add the fastSeek() method to HTMLMediaElement, and use fastSeek() in the JavaScript media controls. Add the new fastSeek() method: * html/HTMLMediaElement.cpp: (HTMLMediaElement::fastSeek): Call seekWithTolerance. (HTMLMediaElement::seek): Call seekWithTolerance with 0 tolerance. (HTMLMediaElement::seekWithTolerance): Renamed from seek(). * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: Add seekWithTolerance() to MediaPlayer: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::seekWithTolerance): Pass to MediaPlayerPrivate. * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::seekWithTolerance): Default implementation which calls seek(). * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::seek): Call seekWithTolerance with 0 tolerance. (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Renamed from seek(). * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Take tolerance parameters. Use the new fastSeek() method while actively scrubbing. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.createControls): Add mouse up and down handlers. (Controller.prototype.handleTimeUpdate): Only update the timeline when not scrubbing. (Controller.prototype.handleTimelineChange): Use fastSeek(). (Controller.prototype.handleTimelineMouseDown): Start scrubbing. (Controller.prototype.handleTimelineMouseUp): Stop scrubbing. LayoutTests: * media/video-fast-seek-expected.txt: Added. * media/video-fast-seek.html: Added. Canonical link: https://commits.webkit.org/142492@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-11-13 18:30:03 +00:00
RUN(video.fastSeek(2.6))
EVENT(timeupdate)
EXPECTED (video.currentTime <= '2.6') OK
EXPECTED (video.currentTime >= '2.5') OK
Add support for HTMLMediaElement.fastSeek() https://bugs.webkit.org/show_bug.cgi?id=124262 Reviewed by Eric Carlson. Source/WebCore: Test: media/video-fast-seek.html Add the fastSeek() method to HTMLMediaElement, and use fastSeek() in the JavaScript media controls. Add the new fastSeek() method: * html/HTMLMediaElement.cpp: (HTMLMediaElement::fastSeek): Call seekWithTolerance. (HTMLMediaElement::seek): Call seekWithTolerance with 0 tolerance. (HTMLMediaElement::seekWithTolerance): Renamed from seek(). * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: Add seekWithTolerance() to MediaPlayer: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::seekWithTolerance): Pass to MediaPlayerPrivate. * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::seekWithTolerance): Default implementation which calls seek(). * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::seek): Call seekWithTolerance with 0 tolerance. (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Renamed from seek(). * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Take tolerance parameters. Use the new fastSeek() method while actively scrubbing. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.createControls): Add mouse up and down handlers. (Controller.prototype.handleTimeUpdate): Only update the timeline when not scrubbing. (Controller.prototype.handleTimelineChange): Use fastSeek(). (Controller.prototype.handleTimelineMouseDown): Start scrubbing. (Controller.prototype.handleTimelineMouseUp): Stop scrubbing. LayoutTests: * media/video-fast-seek-expected.txt: Added. * media/video-fast-seek.html: Added. Canonical link: https://commits.webkit.org/142492@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-11-13 18:30:03 +00:00
Seek before the 4th sync sample:
RUN(video.currentTime = 2.3)
EVENT(timeupdate)
EXPECTED (video.currentTime.toFixed(1) == '2.3') OK
Test that fastSeek() before the currentTime will not result in a seek past the seek time:
Add support for HTMLMediaElement.fastSeek() https://bugs.webkit.org/show_bug.cgi?id=124262 Reviewed by Eric Carlson. Source/WebCore: Test: media/video-fast-seek.html Add the fastSeek() method to HTMLMediaElement, and use fastSeek() in the JavaScript media controls. Add the new fastSeek() method: * html/HTMLMediaElement.cpp: (HTMLMediaElement::fastSeek): Call seekWithTolerance. (HTMLMediaElement::seek): Call seekWithTolerance with 0 tolerance. (HTMLMediaElement::seekWithTolerance): Renamed from seek(). * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: Add seekWithTolerance() to MediaPlayer: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::seekWithTolerance): Pass to MediaPlayerPrivate. * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::seekWithTolerance): Default implementation which calls seek(). * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::seek): Call seekWithTolerance with 0 tolerance. (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Renamed from seek(). * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Take tolerance parameters. Use the new fastSeek() method while actively scrubbing. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.createControls): Add mouse up and down handlers. (Controller.prototype.handleTimeUpdate): Only update the timeline when not scrubbing. (Controller.prototype.handleTimelineChange): Use fastSeek(). (Controller.prototype.handleTimelineMouseDown): Start scrubbing. (Controller.prototype.handleTimelineMouseUp): Stop scrubbing. LayoutTests: * media/video-fast-seek-expected.txt: Added. * media/video-fast-seek.html: Added. Canonical link: https://commits.webkit.org/142492@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-11-13 18:30:03 +00:00
RUN(video.fastSeek(2.2))
EVENT(timeupdate)
EXPECTED (video.currentTime <= '2.2') OK
END OF TEST