| Index: third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp
|
| diff --git a/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp b/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp
|
| index a79e321554cd934336f420935d49d64160b2c75b..063d01b780ae362caac540c498ff23a6f15f231a 100644
|
| --- a/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp
|
| +++ b/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp
|
| @@ -5,6 +5,7 @@
|
| #include "modules/remoteplayback/RemotePlayback.h"
|
|
|
| #include "bindings/core/v8/ScriptPromiseResolver.h"
|
| +#include "core/HTMLNames.h"
|
| #include "core/dom/DOMException.h"
|
| #include "core/dom/Document.h"
|
| #include "core/events/Event.h"
|
| @@ -82,11 +83,16 @@ ScriptPromise RemotePlayback::getAvailability(ScriptState* scriptState)
|
|
|
| ScriptPromise RemotePlayback::prompt(ScriptState* scriptState)
|
| {
|
| - // TODO(avayvod): implement steps 3, 4, 5, 8, 9 of the algorithm.
|
| + // TODO(avayvod): implement steps 4, 5, 8, 9 of the algorithm.
|
| // https://crbug.com/647441
|
| ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
|
| ScriptPromise promise = resolver->promise();
|
|
|
| + if (m_mediaElement->fastHasAttribute(HTMLNames::disableremoteplaybackAttr)) {
|
| + resolver->reject(DOMException::create(InvalidStateError, "disableRemotePlayback attribute is present."));
|
| + return promise;
|
| + }
|
| +
|
| // TODO(avayvod): should we have a separate flag to disable the user gesture
|
| // requirement (for tests) or reuse the one for the PresentationRequest::start()?
|
| if (!UserGestureIndicator::utilizeUserGesture()) {
|
|
|