Title: [140645] trunk
- Revision
- 140645
- Author
- [email protected]
- Date
- 2013-01-23 20:56:03 -0800 (Wed, 23 Jan 2013)
Log Message
Enable autoplay when <video>'s src is from media stream
https://bugs.webkit.org/show_bug.cgi?id=105224
Patch by Wei Jia <[email protected]> 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:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (140644 => 140645)
--- trunk/LayoutTests/ChangeLog 2013-01-24 04:49:21 UTC (rev 140644)
+++ trunk/LayoutTests/ChangeLog 2013-01-24 04:56:03 UTC (rev 140645)
@@ -1,3 +1,14 @@
+2013-01-23 Wei Jia <[email protected]>
+
+ Enable autoplay when <video>'s src is from media stream
+ https://bugs.webkit.org/show_bug.cgi?id=105224
+
+ Reviewed by Eric Carlson.
+
+ 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:
+
2013-01-23 Luke Macpherson <[email protected]>
Support variables inside -webkit-box-reflect CSS property.
Modified: trunk/LayoutTests/platform/chromium/media/video-capture-preview.html (140644 => 140645)
--- trunk/LayoutTests/platform/chromium/media/video-capture-preview.html 2013-01-24 04:49:21 UTC (rev 140644)
+++ trunk/LayoutTests/platform/chromium/media/video-capture-preview.html 2013-01-24 04:56:03 UTC (rev 140645)
@@ -10,6 +10,9 @@
var previewURL = "";
var localStream = null;
+if (window.internals)
+ window.internals.settings.setMediaPlaybackRequiresUserGesture(true);
+
function startPreview()
{
video.src = ""
Modified: trunk/Source/WebCore/ChangeLog (140644 => 140645)
--- trunk/Source/WebCore/ChangeLog 2013-01-24 04:49:21 UTC (rev 140644)
+++ trunk/Source/WebCore/ChangeLog 2013-01-24 04:56:03 UTC (rev 140645)
@@ -1,3 +1,16 @@
+2013-01-23 Wei Jia <[email protected]>
+
+ Enable autoplay when <video>'s src is from media stream
+ https://bugs.webkit.org/show_bug.cgi?id=105224
+
+ Reviewed by Eric Carlson.
+
+ 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):
+
2013-01-23 Roger Fong <[email protected]>
Remove ForwardingHeaders/wtf from WebCore.
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (140644 => 140645)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2013-01-24 04:49:21 UTC (rev 140644)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2013-01-24 04:56:03 UTC (rev 140645)
@@ -121,6 +121,10 @@
#include "MediaSourceRegistry.h"
#endif
+#if ENABLE(MEDIA_STREAM)
+#include "MediaStreamRegistry.h"
+#endif
+
using namespace std;
namespace WebCore {
@@ -1017,6 +1021,11 @@
LOG(Media, "HTMLMediaElement::loadResource - m_currentSrc -> %s", urlForLoggingMedia(m_currentSrc).utf8().data());
+#if ENABLE(MEDIA_STREAM)
+ if (MediaStreamRegistry::registry().lookupMediaStreamDescriptor(url.string()))
+ removeBehaviorRestriction(RequireUserGestureForRateChangeRestriction);
+#endif
+
if (m_sendProgressEvents)
startProgressEventTimer();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes