WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
144332
[Mac] Simplify code to support media engines which do not support target playback
https://bugs.webkit.org/show_bug.cgi?id=144332
Summary
[Mac] Simplify code to support media engines which do not support target play...
Eric Carlson
Reported
2015-04-28 08:35:54 PDT
Simplify the code added in
r182240
to support media engines that do not support a playback target.
Attachments
Proposed patch
(24.01 KB, patch)
2015-04-28 11:24 PDT
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Rebased patch.
(23.30 KB, patch)
2015-04-28 12:07 PDT
,
Eric Carlson
jer.noble
: review+
Details
Formatted Diff
Diff
Patch for landing
(22.39 KB, patch)
2015-04-28 14:34 PDT
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-04-28 08:37:57 PDT
<
rdar://problem/20727457
>
Eric Carlson
Comment 2
2015-04-28 11:24:19 PDT
Created
attachment 251868
[details]
Proposed patch
Eric Carlson
Comment 3
2015-04-28 12:07:54 PDT
Created
attachment 251873
[details]
Rebased patch.
WebKit Commit Bot
Comment 4
2015-04-28 12:10:06 PDT
Attachment 251873
[details]
did not pass style-queue: ERROR: Source/WebCore/html/HTMLMediaSession.cpp:207: Missing space before { [whitespace/braces] [5] Total errors found: 1 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jer Noble
Comment 5
2015-04-28 12:36:26 PDT
Comment on
attachment 251873
[details]
Rebased patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=251873&action=review
r=me, with nits:
> Source/WebCore/html/HTMLMediaElement.cpp:748 > + if (m_pendingActionFlags & StopPlayingToTarget) { > + if (m_player && m_player->isCurrentPlaybackTargetWireless() && !m_player->canPlayToWirelessPlaybackTarget()) {
No need to nest these if statements.
> Source/WebCore/html/HTMLMediaElement.cpp:4899 > + RefPtr<Event> event = prpEvent; > + bool cancelled = HTMLElement::dispatchEvent(event); > + > + if (event->type() != eventNames().webkitcurrentplaybacktargetiswirelesschangedEvent) > + return cancelled; > + if (!m_player || !m_player->isCurrentPlaybackTargetWireless() || m_player->canPlayToWirelessPlaybackTarget()) > + return cancelled; > + > + scheduleDelayedAction(StopPlayingToTarget);
Since we have to double check these have to be double-checked anyway inside of pendingActionTimerFired(), could we just re-write this to be?: if (event->type() == eventNames().webkitcurrentplaybacktargetiswirelesschangedEvent) scheduleDelayedAction(StopPlayingToTarget); return HTMLElement::dispatchEvent(event);
> Source/WebCore/html/HTMLMediaElement.cpp:5905 > - return potentiallyPlaying() ? requestedPlaybackRate() : 0; > + double requestedPlaybackRate = this->requestedPlaybackRate(); > + bool potentiallyPlaying = this->potentiallyPlaying(); > + LOG(Media, "HTMLMediaElement::mediaPlayerRequestedPlaybackRate(%p) - potentiallyPlaying = %s, returning %f", this, boolString(potentiallyPlaying), requestedPlaybackRate); > + return potentiallyPlaying ? requestedPlaybackRate : 0;
Seems like this logging may potentially be very noisy.
> Source/WebCore/html/HTMLMediaSession.cpp:385 > - setWirelessVideoPlaybackDisabled(element, m_restrictions & WirelessVideoPlaybackDisabled); > + if (m_restrictions & WirelessVideoPlaybackDisabled) > + setWirelessVideoPlaybackDisabled(element, true);
Is there some reason we're no longer setting this to false if the restriction has been lifted?
Eric Carlson
Comment 6
2015-04-28 14:34:24 PDT
Created
attachment 251888
[details]
Patch for landing
Eric Carlson
Comment 7
2015-04-28 14:42:08 PDT
Committed
r183509
:
https://trac.webkit.org/r183509
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug