Bug 172771 - PeerConnection should respect tracks that are muted at the time they are added
Summary: PeerConnection should respect tracks that are muted at the time they are added
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-05-31 12:44 PDT by youenn fablet
Modified: 2017-06-02 16:32 PDT (History)
5 users (show)

See Also:


Attachments
Patch (17.08 KB, patch)
2017-05-31 12:48 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (17.26 KB, patch)
2017-05-31 13:18 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2017-05-31 12:44:53 PDT
Currently, it is not the case and muted state is not respected.
Comment 1 youenn fablet 2017-05-31 12:48:06 PDT
Created attachment 311622 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2017-05-31 12:48:41 PDT
<rdar://problem/32493091>
Comment 3 Eric Carlson 2017-05-31 13:05:31 PDT
Comment on attachment 311622 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=311622&action=review

> Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp:105
> +    if (!m_muted && m_enabled && m_blackFrameTimer.isActive()) {
> +        m_blackFrameTimer.stop();
>          return;
>      }
> -    if (m_blackFrameTimer.isActive())
> -        m_blackFrameTimer.stop();
> +
> +    sendBlackFramesIfNeeded();

I would be nice to factor this into a function that can be shared with sourceMutedChanged.
Comment 4 youenn fablet 2017-05-31 13:18:41 PDT
Created attachment 311625 [details]
Patch
Comment 5 youenn fablet 2017-05-31 13:21:37 PDT
Thanks for the review.

(In reply to Eric Carlson from comment #3)
> Comment on attachment 311622 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=311622&action=review
> 
> > Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp:105
> > +    if (!m_muted && m_enabled && m_blackFrameTimer.isActive()) {
> > +        m_blackFrameTimer.stop();
> >          return;
> >      }
> > -    if (m_blackFrameTimer.isActive())
> > -        m_blackFrameTimer.stop();
> > +
> > +    sendBlackFramesIfNeeded();
> 
> I would be nice to factor this into a function that can be shared with
> sourceMutedChanged.

Done.
Comment 6 WebKit Commit Bot 2017-05-31 13:51:15 PDT
Comment on attachment 311625 [details]
Patch

Clearing flags on attachment: 311625

Committed r217624: <http://trac.webkit.org/changeset/217624>
Comment 7 WebKit Commit Bot 2017-05-31 13:51:17 PDT
All reviewed patches have been landed.  Closing bug.