Bug 73405

Summary: When playing audio in <video>, the poster is hidden on play
Product: WebKit Reporter: Jeroen Wijering <mail>
Component: Media ElementsAssignee: Eric Carlson <eric.carlson>
Severity: Normal CC: eric.carlson, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://goo.gl/0g77d
Description Flags
Proposed patch darin: review+

Description Jeroen Wijering 2011-11-30 00:06:11 PST
Playing an audio file in <video> is allowed and works fine. However, when the audio starts playing, the poster image is removed. 

Per the spec, the poster image should stay visible:

"When no video data is available (... the media resource does not have a video channel), the video element represents the poster frame."

This also provides a better experience. A poster image is nicer than a white screen.
Comment 1 Eric Carlson 2011-11-30 13:01:56 PST
Safari on 10.7.2 behaves correctly.
Comment 2 Eric Carlson 2011-11-30 13:04:38 PST
But Safari 5.1 on 10.6.8 does not, so it apparently depends on the media engine.
Comment 3 Eric Carlson 2011-11-30 13:08:38 PST
We display the poster until HTMLVideoElement::hasAvailableVideoFrame returns true. That method asks the media engine if has video to display. The QTKit based method (MediaPlayerPrivateQTKit::hasAvailableVideoFrame) can't tell if a QTMovieLayer actually has frames ready to display, but it also doesn't check to see if the movie has video at all.
Comment 4 Eric Carlson 2011-11-30 13:53:09 PST
This could be fixed in each of the media engines that have a problem (at least QTKit, QuickTime, and Chrome), or by adding one test to HTMLVideoElement. I am going to go with the later.
Comment 5 Eric Carlson 2011-11-30 13:53:53 PST
Created attachment 117265 [details]
Proposed patch
Comment 6 Darin Adler 2011-11-30 19:35:14 PST
Comment on attachment 117265 [details]
Proposed patch

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

> Source/WebCore/ChangeLog:8
> +        No new tests. (OOPS!)

Bad to not have tests.

Also can’t land the patch without removing the OOPS ;-)
Comment 7 Radar WebKit Bug Importer 2011-12-01 09:01:07 PST
Comment 8 Eric Carlson 2011-12-01 09:01:56 PST