Changeset 223902 in webkit


Ignore:
Timestamp:
Oct 24, 2017 11:40:17 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

[MediaFoundation] Videos are always autoplaying for local files
https://bugs.webkit.org/show_bug.cgi?id=178693

Patch by Doug Massay.
Patch by Konstantin Tokarev <Konstantin Tokarev> on 2017-10-24
Reviewed by Alex Christensen.

r199114 fixes autoplay issue only if starting session invokes
buffering stage. However when local files are played, onBufferingStarted
and onBufferingStopped are not called, and video is not paused.

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
(WebCore::MediaPlayerPrivateMediaFoundation::onSessionStarted):

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r223900 r223902  
     12017-10-24  Konstantin Tokarev  <annulen@yandex.ru>
     2
     3        [MediaFoundation] Videos are always autoplaying for local files
     4        https://bugs.webkit.org/show_bug.cgi?id=178693
     5
     6        Patch by Doug Massay.
     7        Reviewed by Alex Christensen.
     8
     9        r199114 fixes autoplay issue only if starting session invokes
     10        buffering stage. However when local files are played, onBufferingStarted
     11        and onBufferingStopped are not called, and video is not paused.
     12
     13        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
     14        (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
     15        (WebCore::MediaPlayerPrivateMediaFoundation::onSessionStarted):
     16        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
     17
    1182017-10-24  Matt Lewis  <jlewis3@apple.com>
    219
  • trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp

    r223728 r223902  
    536536    }
    537537
     538    case MESessionStarted: {
     539        callOnMainThread([weakPtr = m_weakPtrFactory.createWeakPtr(*this)] {
     540            if (!weakPtr)
     541                return;
     542            weakPtr->onSessionStarted();
     543        });
     544        break;
     545    }
     546
    538547    case MEBufferingStarted: {
    539548        callOnMainThread([weakPtr = m_weakPtrFactory.createWeakPtr(*this)] {
     
    918927
    919928void MediaPlayerPrivateMediaFoundation::onBufferingStopped()
     929{
     930    updateReadyState();
     931}
     932
     933void MediaPlayerPrivateMediaFoundation::onSessionStarted()
    920934{
    921935    updateReadyState();
  • trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h

    r223728 r223902  
    152152    void onBufferingStarted();
    153153    void onBufferingStopped();
     154    void onSessionStarted();
    154155    void onSessionEnded();
    155156
Note: See TracChangeset for help on using the changeset viewer.