[iOS] Some videos play as inline audio-only content
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Jul 2014 21:22:10 +0000 (21:22 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Jul 2014 21:22:10 +0000 (21:22 +0000)
commitb5da530f000b2914b99f8f61a3b8d53418600289
tree08d74a2a6f8316e7f5979a0e34c9ca68a2d1e429
parentf02e48783582753b0b391f7fcfc06090a593f3b9
[iOS] Some videos play as inline audio-only content
https://bugs.webkit.org/show_bug.cgi?id=134898.
<rdar://problem/17629379>

Reviewed by Eric Carlson.

Add a new 'presentationType' accessor that indicates if the media
element is playing in 'audio' mode. This can happen if a video
element plays an HLS stream that starts off in audio-only mode.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::presentationType): Added.
* html/HTMLMediaElement.h:
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::presentationType): Added.
* platform/audio/MediaSession.h:
* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::sessionRestrictsInlineVideoPlayback):
Use the presentationType, rather than the mediaType to control
inline playback behavior.
* platform/audio/ios/AudioDestinationIOS.h:
(WebCore::AudioDestinationMac::presentationType): Add presentationType.
* platform/audio/mac/AudioDestinationMac.h:
(WebCore::AudioDestinationMac::presentationType): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/platform/audio/MediaSession.cpp
Source/WebCore/platform/audio/MediaSession.h
Source/WebCore/platform/audio/MediaSessionManager.cpp
Source/WebCore/platform/audio/ios/AudioDestinationIOS.h
Source/WebCore/platform/audio/mac/AudioDestinationMac.h