New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to alternate <source> element for AirPlay when necessary #5380
Switch to alternate <source> element for AirPlay when necessary #5380
Conversation
EWS run on previous version of this PR (hash 662a2f3) |
662a2f3
to
2f9aeab
Compare
EWS run on previous version of this PR (hash 2f9aeab) |
ERROR_LOG(LOGIDENTIFIER, "player incompatible after ", delta.value(), ", calling setShouldPlayToPlaybackTarget(false)"); | ||
m_failedToPlayToWirelessTarget = true; | ||
m_remotePlaybackConfiguration = { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be: m_remotePlaybackConfiguration = std::nullopt;
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two are equivalent
2f9aeab
to
4870c57
Compare
EWS run on current version of this PR (hash 4870c57) |
https://bugs.webkit.org/show_bug.cgi?id=246466 <rdar://101136233> Reviewed by Jer Noble. * LayoutTests/media/media-source/remoteplayback-from-source-element-expected.txt: Added. * LayoutTests/media/media-source/remoteplayback-from-source-element.html: Added. * LayoutTests/TestExpectations: New test skipped everywhere. * LayoutTests/platform/mac/TestExpectations: New test enabled. * Source/WebCore/Modules/remoteplayback/RemotePlayback.cpp: (WebCore::RemotePlayback::watchAvailability): Add runtime logging. (WebCore::RemotePlayback::cancelWatchAvailability): Ditto. (WebCore::RemotePlayback::prompt): Ditto. (WebCore::RemotePlayback::shouldPlayToRemoteTargetChanged): Ditto. (WebCore::RemotePlayback::setState): Ditto. (WebCore::RemotePlayback::disconnect): Ditto. (WebCore::RemotePlayback::availabilityChanged): Ditto. (WebCore::RemotePlayback::setLogger): Ditto. (WebCore::RemotePlayback::logChannel const): Ditto. * Source/WebCore/Modules/remoteplayback/RemotePlayback.h: * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Set remote logger. (WebCore::HTMLMediaElement::checkPlaybackTargetCompatibility): If loaded from a <source> element and is another <source> uses a media engine that supports remote playback, try loading that. (WebCore::HTMLMediaElement::loadResource): Don't bother trying MSE, MediaStream, or blob if the load requires remote playback. (WebCore::HTMLMediaElement::applyConfiguration): Apply the stored configuration. (WebCore::HTMLMediaElement::setReadyState): Apply the remote configuration once HAVE_FUTURE_DATA is reached. (WebCore::HTMLMediaElement::selectNextSourceChild): Set parameter `requiresRemotePlayback` field. (WebCore::HTMLMediaElement::clearMediaPlayer): Force a target availability event. (WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange): Only post availability event when availability actually changes. (WebCore::HTMLMediaElement::setIsPlayingToWirelessTarget): (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Add parameter so we don't necessarily post events when availability doesn't change. (WebCore::HTMLMediaElement::addEventListener): Force a target availability event. * Source/WebCore/html/HTMLMediaElement.h: * Source/WebCore/html/MediaElementSession.cpp: (WebCore::MediaElementSession::showPlaybackTargetPicker): Always log. * Source/WebCore/platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::load): Add `requiresRemotePlayback` parameter. * Source/WebCore/platform/graphics/MediaPlayer.h: (WebCore::MediaEngineSupportParameters::encode const): (WebCore::MediaEngineSupportParameters::decode): * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsType): Consider new support field. * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm: (WebCore::MediaPlayerPrivateWebM::supportsType): Ditto. * Source/WebCore/testing/Internals.cpp: (WebCore::Internals::setMockMediaPlaybackTargetPickerEnabled): NULL-check frame and page. (WebCore::Internals::setMockMediaPlaybackTargetPickerState): Ditto. (WebCore::Internals::mockMediaPlaybackTargetPickerDismissPopup): Ditto. * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::load): Add "requires remote playback" parameter. * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h: * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in: Ditto. * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::load): Ditto. * Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.cpp: (WebKit::RemoteMediaPlayerMIMETypeCache::supportsTypeAndCodecs): Ditto. * Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.h: Canonical link: https://commits.webkit.org/255624@main
4870c57
to
4ec10f6
Compare
Committed 255624@main (4ec10f6): https://commits.webkit.org/255624@main Reviewed commits have been landed. Closing PR #5380 and removing active labels. |
4ec10f6
4870c57