[webkit-gtk] video tag loop attribute

Philippe Normand pnormand at igalia.com
Fri Jun 3 03:04:36 PDT 2011


That's an issue of the GStreamer oggdemux element not working very well
in push mode.

This branch contains 2 patches fixing the issue:
http://cgit.collabora.com/git/user/vincent/gst-plugins-base/?h=seeking

See also this related bug:
https://bugzilla.gnome.org/show_bug.cgi?id=621897

With that gst-plugins-base branch the videotag.html works as you'd
expect :)

Philippe

On Thu, 2011-06-02 at 18:08 -0400, Christian Betz wrote: 
> Hi.
> 
> I am working on a webkit-gtk based project that makes use of the
> <video> element. It works great for the most part, but I have found
> that the video does not loop if the loop attribute is used. (The loop
> attribute works fine in chrome) Also, this seems to only affect some
> videos:
> 
>  http://sicom.com/~cbetz/videotag.html  -- does not loop using an
> official theora example video (http://wiki.xiph.org/TheoraTestsuite)
>  http://sicom.com/~cbetz/videotag_works.html  -- does loop using
> random video from wikipedia
> 
> I'm not sure yet if this is a webcore, webkit gtk, or gstreamer issue,
> but I'm interested in fixing it. This my first foray into webkit
> development. Can anyone point me in the right direction?
> 
> I determined that the loop attribute *is* at least getting picked up
> in Source/WebCore/html/HTMLMediaElement.cpp. The problem *appears* to
> be with the seeking back to the beginning that should occur after the
> first run of the video has played. Here is the debug output starting
> when the browser first loads the page with the video tag.
> 
> (I am using WebKit-r87124. With WEBKIT_DEBUG set to "Media")
> 
> HTMLMediaElement::HTMLMediaElement
> HTMLMediaElement::scheduleLoad
> HTMLMediaElement::prepareForLoad
> HTMLMediaElement::cancelPendingEventsAndCallbacks
> HTMLMediaElement::setPlaybackRate(1.000000)
> HTMLMediaElement::setShouldDelayLoadEvent(true)
> HTMLMediaElement::removedFromDocument
> HTMLMediaElement::selectMediaResource
> HTMLMediaElement::loadResource(http://cbetz.staff/projects/dmb/thor.ogv, )
> HTMLMediaElement::loadResource - m_currentSrc ->
> http://cbetz.staff/projects/dmb/thor.ogv
> HTMLMediaElement::mediaPlayerEngineUpdated
> HTMLMediaElement::selectMediaResource, 'src' not used
> HTMLMediaElement::mediaPlayerEngineUpdated
> HTMLMediaElement::mediaPlayerEngineUpdated
> HTMLMediaElement::setNetworkState(2) - current state is 2
> HTMLMediaElement::setReadyState(2) - current state is 0,
> HTMLMediaElement::setShouldDelayLoadEvent(false)
> HTMLMediaElement::updatePlayState - shouldBePlaying = false, playerPaused = true
> HTMLMediaElement::setReadyState(4) - current state is 2,
> HTMLMediaElement::invalidateCachedTime
> HTMLMediaElement::updatePlayState - shouldBePlaying = true, playerPaused = true
> HTMLMediaElement::invalidateCachedTime
> HTMLMediaElement::mediaPlayerMuteChanged
> HTMLMediaElement::setMuted(false)
> HTMLMediaElement::setNetworkState(3) - current state is 2
> 
> ... then the video stops playing ....
> 
> HTMLMediaElement::mediaPlayerDurationChanged
> HTMLMediaElement::mediaPlayerCharacteristicChanged
> HTMLMediaElement::mediaPlayerTimeChanged
> HTMLMediaElement::invalidateCachedTime
> HTMLMediaElement::seek(0.000000)
> HTMLMediaElement::addPlayedRange(0.000000, 13.000000)
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::updatePlayState - shouldBePlaying = true, playerPaused = false
> HTMLMediaElement::invalidateCachedTime
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> HTMLMediaElement::currentTime - seeking, returning 0.000000
> ..
> 
> 
> The last message continues repeating ever second or so until the
> browser is closed.
> 
> If you made it this far, thanks for looking!
> 
> Christian
> _______________________________________________
> webkit-gtk mailing list
> webkit-gtk at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-gtk
> 





More information about the webkit-gtk mailing list