Lines Matching defs:video
59 static IntSize sizeFor(HTMLVideoElement* video)
61 if (MediaPlayer* player = video->player())
114 ScriptPromise ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget, HTMLVideoElement* video, ExceptionState& exceptionState)
116 IntSize s = sizeFor(video);
117 return createImageBitmap(eventTarget, video, 0, 0, s.width(), s.height(), exceptionState);
120 ScriptPromise ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget, HTMLVideoElement* video, int sx, int sy, int sw, int sh, ExceptionState& exceptionState)
125 if (!video) {
129 if (!video->player()) {
133 if (video->networkState() == HTMLMediaElement::NETWORK_EMPTY) {
137 if (video->player()->readyState() <= MediaPlayer::HaveMetadata) {
145 if (!video->hasSingleSecurityOrigin()) {
146 exceptionState.throwSecurityError("the source video contains cross-origin image data.");
149 if (!video->player()->didPassCORSAccessCheck() && eventTarget->toDOMWindow()->document()->securityOrigin()->taintsCanvas(video->currentSrc())) {
150 exceptionState.throwSecurityError("cross-origin access to the source video is denied.");
154 return fulfillImageBitmap(eventTarget->executionContext(), ImageBitmap::create(video, IntRect(sx, sy, sw, sh)));