Summary: | Allow the platform media player to know the <video> poster URL. | ||
---|---|---|---|
Product: | WebKit | Reporter: | Andrei Popescu <andreip> |
Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | benm, eric.carlson |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | Other | ||
Attachments: |
Description
Andrei Popescu
2009-09-10 11:17:51 PDT
Created attachment 39360 [details]
Add setPoster() & canLoadPoster() methods to the MediaPlayer class and MediaPlayerPrivate iface.
Comment on attachment 39360 [details]
Add setPoster() & canLoadPoster() methods to the MediaPlayer class and MediaPlayerPrivate iface.
Does this have any affect on anything besides andriod? Do other <video> implementations use the poster image? Why does android need it? And why can't we test this? the OOPS! in your ChangeLog will cause this to fail to land. The reviewed by line OOPS is OK, because our landing scripts will take care of fixing that one.
Hi Eric, (In reply to comment #2) > (From update of attachment 39360 [details]) > Does this have any affect on anything besides andriod? Currently not, since Android is the only platform that currently returns true for canLoadPoster(). However, I expect that other mobile platforms may have the same problem and may need this. >Do other <video> > implementations use the poster image? Yes, all of them. It is part of the spec. >Why does android need it? The problems is as follows: currently the HTMLVideoElement creates a RenderImage and loads the poster. This poster is shown on the page (where the video should render) until the media player has buffered enough content and is able to generate a thumbnail based on the first few frames of the video. However, this doesn't work for our player, which cannot currently generate such a thumbnail. On the other hand, if the user has specified the "poster" attribute, our player can just show the user-provided poster instead. In order to use it, it needs to know its URL. Hence this change. >And why can't > we test this? I wasn't entirely sure how to test this. As I said above, we're the only platform that returns 'true' in canLoadPoster() so all other platforms are currently unaffected by this change...Do you have a suggestion? >the OOPS! in your ChangeLog will cause this to fail to land. Oh, I did not know. I will just remove it if we agree what to do about testing. Thanks, Andrei Created attachment 39421 [details]
Add setPoster() & canLoadPoster() methods to the MediaPlayer class and MediaPlayerPrivate iface. (take 2)
Comment on attachment 39421 [details]
Add setPoster() & canLoadPoster() methods to the MediaPlayer class and MediaPlayerPrivate iface. (take 2)
Clearing the r? flag while I talk offline with Andrei about this.
Created attachment 40527 [details]
Add prepareToPlay(), setPoster() and canLoadPoster() methods to the MediaPlayer class and MediaPlayerPrivate iface. (take 3)
Hi Eric,
Sorry for the late reply on this, it's only today that I got a chance to upload a new patch.
As we discussed, I have added a method that is called when the state of HTMLMediaElement is 'readyToPlay' but the media backend doesn't yet have enough data. This is the case with our backend that does not prebuffer any content. This allows the state to be correct from the beginning (NetworkState::Empty and ReadyState::HaveNothing) and allows the backend to change the network and ready states just before playback.
I left the setPoster method where it was in the first patch. Before playback, it's WebCore that draws the poster. After playback, it's the MediaPlayerPrivate that draws the poster in its paint method.
All the best,
Andrei
Created attachment 40529 [details]
Add prepareToPlay(), setPoster() and canLoadPoster() methods to the MediaPlayer class and MediaPlayerPrivate iface. (take 3)
Looks like there was something wrong with the Changelog in the previous patch. Fixed.
Comment on attachment 40529 [details]
Add prepareToPlay(), setPoster() and canLoadPoster() methods to the MediaPlayer class and MediaPlayerPrivate iface. (take 3)
r=me
Thanks Andrei!
Comment on attachment 40529 [details]
Add prepareToPlay(), setPoster() and canLoadPoster() methods to the MediaPlayer class and MediaPlayerPrivate iface. (take 3)
Andrei is not a committer yet, adding cq+.
(In reply to comment #9) > (From update of attachment 40529 [details]) > Andrei is not a committer yet, adding cq+. Did the CQ grab this already? Andrei asked me to remove a tab in the ChangeLog and I fixed some extra braces -- was just about to manually commit.... Looks like the CQ didn't get it yet. I'll land manually. landed as r49164. |