Changeset 204069 in webkit
- Timestamp:
- Aug 2, 2016, 11:15:56 PM (10 years ago)
- Location:
- branches/safari-602-branch/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
html/HTMLMediaElement.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-602-branch/Source/WebCore/ChangeLog
r204068 r204069 1 2016-08-02 Babak Shafiei <bshafiei@apple.com> 2 3 Merge r203984. rdar://problem/27409854 4 5 2016-08-01 Eric Carlson <eric.carlson@apple.com> 6 7 [iOS] A video element that does not pause after exiting from fullscreen should be allowed to continue playing inline 8 https://bugs.webkit.org/show_bug.cgi?id=160416 9 <rdar://problem/27409854> 10 11 Reviewed by Alex Christensen. 12 13 * html/HTMLMediaElement.cpp: 14 (WebCore::HTMLMediaElement::exitFullscreen): If playback normally requires fullscreen but the 15 element was not paused when exiting from fullscreen, set the 'playsinline' attribute so we won't 16 force fullscreen if playback is paused and resumes, and set the 'controls' attribute so the 17 user can control playback. 18 1 19 2016-08-02 Babak Shafiei <bshafiei@apple.com> 2 20 -
branches/safari-602-branch/Source/WebCore/html/HTMLMediaElement.cpp
r204068 r204069 5465 5465 if (hasMediaControls()) 5466 5466 mediaControls()->exitedFullscreen(); 5467 if (document().page() && is<HTMLVideoElement>(*this)) { 5468 if (m_mediaSession->requiresFullscreenForVideoPlayback(*this) && (!document().settings() || !document().settings()->allowsInlineMediaPlaybackAfterFullscreen() || isVideoTooSmallForInlinePlayback())) 5467 5468 if (!document().page() || !is<HTMLVideoElement>(*this)) 5469 return; 5470 5471 if (!paused() && m_mediaSession->requiresFullscreenForVideoPlayback(*this)) { 5472 if (!document().settings() || !document().settings()->allowsInlineMediaPlaybackAfterFullscreen() || isVideoTooSmallForInlinePlayback()) 5469 5473 pauseInternal(); 5474 else { 5475 // Allow inline playback, but set 'playsinline' so pausing and starting again (e.g. when scrubbing) won't go back to fullscreen. 5476 // Also set the controls attribute so the user will be able to control playback. 5477 setBooleanAttribute(HTMLNames::playsinlineAttr, true); 5478 setControls(true); 5479 } 5480 } 5470 5481 5471 5482 #if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE) 5472 if (document().activeDOMObjectsAreSuspended() || document().activeDOMObjectsAreStopped()) 5473 document().page()->chrome().client().exitVideoFullscreenToModeWithoutAnimation(downcast<HTMLVideoElement>(*this), VideoFullscreenModeNone); 5474 else 5475 #endif 5476 if (document().page()->chrome().client().supportsVideoFullscreen(oldVideoFullscreenMode)) { 5477 document().page()->chrome().client().exitVideoFullscreenForVideoElement(downcast<HTMLVideoElement>(*this)); 5478 scheduleEvent(eventNames().webkitendfullscreenEvent); 5479 } 5483 if (document().activeDOMObjectsAreSuspended() || document().activeDOMObjectsAreStopped()) 5484 document().page()->chrome().client().exitVideoFullscreenToModeWithoutAnimation(downcast<HTMLVideoElement>(*this), VideoFullscreenModeNone); 5485 else 5486 #endif 5487 if (document().page()->chrome().client().supportsVideoFullscreen(oldVideoFullscreenMode)) { 5488 document().page()->chrome().client().exitVideoFullscreenForVideoElement(downcast<HTMLVideoElement>(*this)); 5489 scheduleEvent(eventNames().webkitendfullscreenEvent); 5480 5490 } 5481 5491 }
Note:
See TracChangeset
for help on using the changeset viewer.