Changeset 140645 in webkit


Ignore:
Timestamp:
Jan 23, 2013 8:56:03 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Enable autoplay when <video>'s src is from media stream
https://bugs.webkit.org/show_bug.cgi?id=105224

Patch by Wei Jia <wjia@chromium.org> on 2013-01-23
Reviewed by Eric Carlson.

Source/WebCore:

Enable autoplay when <video>'s src is from media stream. This would avoid requesting multiple gestures when <video> is used for WebRTC.
The test is done by modifying platform/chromium/media/video-capture-preview.html.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::loadResource):

LayoutTests:

Always turns on mediaPlaybackRequiresUserGesture at the beginning.
HTMLMediaElement is supposed to turn it off when <video>'s src is from media stream.

  • platform/chromium/media/video-capture-preview.html:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r140642 r140645  
     12013-01-23  Wei Jia  <wjia@chromium.org>
     2
     3        Enable autoplay when <video>'s src is from media stream
     4        https://bugs.webkit.org/show_bug.cgi?id=105224
     5
     6        Reviewed by Eric Carlson.
     7
     8        Always turns on mediaPlaybackRequiresUserGesture at the beginning.
     9        HTMLMediaElement is supposed to turn it off when <video>'s src is from media stream.
     10        * platform/chromium/media/video-capture-preview.html:
     11
    1122013-01-23  Luke Macpherson   <macpherson@chromium.org>
    213
  • trunk/LayoutTests/platform/chromium/media/video-capture-preview.html

    r125149 r140645  
    1010var previewURL = "";
    1111var localStream = null;
     12
     13if (window.internals)
     14    window.internals.settings.setMediaPlaybackRequiresUserGesture(true);
    1215
    1316function startPreview()
  • trunk/Source/WebCore/ChangeLog

    r140644 r140645  
     12013-01-23  Wei Jia  <wjia@chromium.org>
     2
     3        Enable autoplay when <video>'s src is from media stream
     4        https://bugs.webkit.org/show_bug.cgi?id=105224
     5
     6        Reviewed by Eric Carlson.
     7
     8        Enable autoplay when <video>'s src is from media stream. This would avoid requesting multiple gestures when <video> is used for WebRTC.
     9        The test is done by modifying platform/chromium/media/video-capture-preview.html.
     10
     11        * html/HTMLMediaElement.cpp:
     12        (WebCore::HTMLMediaElement::loadResource):
     13
    1142013-01-23  Roger Fong  <roger_fong@apple.com>
    215
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r140359 r140645  
    122122#endif
    123123
     124#if ENABLE(MEDIA_STREAM)
     125#include "MediaStreamRegistry.h"
     126#endif
     127
    124128using namespace std;
    125129
     
    10181022    LOG(Media, "HTMLMediaElement::loadResource - m_currentSrc -> %s", urlForLoggingMedia(m_currentSrc).utf8().data());
    10191023
     1024#if ENABLE(MEDIA_STREAM)
     1025    if (MediaStreamRegistry::registry().lookupMediaStreamDescriptor(url.string()))
     1026        removeBehaviorRestriction(RequireUserGestureForRateChangeRestriction);
     1027#endif
     1028
    10201029    if (m_sendProgressEvents)
    10211030        startProgressEventTimer();
Note: See TracChangeset for help on using the changeset viewer.