[webkit-reviews] review granted: [Bug 35328] [Qt] Various Fixes to MediaPlayerPrivateQt : [Attachment 49358] Initial Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 24 07:29:29 PST 2010


Eric Carlson <eric.carlson at apple.com> has granted Nick Young
<nicholas.young at nokia.com>'s request for review:
Bug 35328: [Qt] Various Fixes to MediaPlayerPrivateQt
https://bugs.webkit.org/show_bug.cgi?id=35328

Attachment 49358: Initial Patch
https://bugs.webkit.org/attachment.cgi?id=49358&action=review

------- Additional Comments from Eric Carlson <eric.carlson at apple.com>
 
> +	   // Grab the client media element
> +	   HTMLMediaElement* element =
static_cast<HTMLMediaElement*>(m_player->mediaPlayerClient());
> +
>	   // Grab the current document
>	   Document* document = element->document();
>	   if (!document)

Instead of using the element to get to the frame and document, you can use
MediaPlayer's frameView().


>      QLatin1String bytesLoadedKey("bytes-loaded");
>      if (m_mediaPlayer->availableExtendedMetaData().contains(bytesLoadedKey))

>	   return m_mediaPlayer->extendedMetaData(bytesLoadedKey).toInt();
>  
> -    return percentage;
> +    return m_mediaPlayer->bufferStatus();

It looks like bufferStatus() return the percent loaded. Shouldn't you multiply
this by the resource size here to get bytes loaded?

r=me with these changes.


More information about the webkit-reviews mailing list