RESOLVED FIXED 216415
End of media capture should not be reported before 3 seconds of the start of capture
https://bugs.webkit.org/show_bug.cgi?id=216415
Summary End of media capture should not be reported before 3 seconds of the start of ...
youenn fablet
Reported 2020-09-11 12:07:20 PDT
End of media capture should not be reported before 3 seconds of the start of capture
Attachments
Patch (13.57 KB, patch)
2020-09-11 12:12 PDT, youenn fablet
no flags
Patch (18.40 KB, patch)
2020-09-14 00:32 PDT, youenn fablet
no flags
Patch for landing (19.31 KB, patch)
2020-09-15 00:58 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2020-09-11 12:12:45 PDT
youenn fablet
Comment 2 2020-09-14 00:32:15 PDT
youenn fablet
Comment 3 2020-09-14 02:08:37 PDT
Radar WebKit Bug Importer
Comment 4 2020-09-14 02:08:59 PDT
Eric Carlson
Comment 5 2020-09-14 08:39:41 PDT
Comment on attachment 408684 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408684&action=review > Source/WebKit/ChangeLog:8 > + Add support for delaying of end of capture. We're not delaying the end of capture, just the state transition. Also, I think it would be helpful to state why this is being changed. Maybe just: A capture indicator should be visible to the user for at least three seconds. > Source/WebKit/ChangeLog:9 > + A timer is scheduled when transitioning from no capture to capture. s/transitioning from no capture to capture/transitioning from capture to no capture/ > Source/WebKit/UIProcess/API/C/WKPage.cpp:3004 > +void WKPageSetMediaCaptureReportingDelayForTesting(WKPageRef page, double delay) > +{ > + toImpl(page)->setMediaCaptureReportingDelay(Seconds(delay)); > +} It seems a shame to add new C API > Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:330 > +@property (nonatomic, setter=_setMediaCaptureReportingDelayForTesting:) double _mediaCaptureReportingDelayForTesting WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); Should this go in WKWebViewPrivateForTesting.h instead? > Source/WebKit/UIProcess/WebPageProxy.cpp:9073 > + bool isReportingCapture = m_reportedMediaCaptureState & MediaProducer::MediaCaptureMask; `haveReportedCapture` might be better.
youenn fablet
Comment 6 2020-09-14 08:51:03 PDT
Thanks for the review. Will update the patch according all comments before landing. (In reply to Eric Carlson from comment #5) > Comment on attachment 408684 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=408684&action=review > > > Source/WebKit/ChangeLog:8 > > + Add support for delaying of end of capture. > > We're not delaying the end of capture, just the state transition. Also, I > think it would be helpful to state why this is being changed. > > Maybe just: A capture indicator should be visible to the user for at least > three seconds. OK > > Source/WebKit/UIProcess/API/C/WKPage.cpp:3004 > > +void WKPageSetMediaCaptureReportingDelayForTesting(WKPageRef page, double delay) > > +{ > > + toImpl(page)->setMediaCaptureReportingDelay(Seconds(delay)); > > +} > > It seems a shame to add new C API Yes, I initially went ObjC. I added this one so that other ports do not have to add their own versions to continue running some of the existing tests. > > Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:330 > > +@property (nonatomic, setter=_setMediaCaptureReportingDelayForTesting:) double _mediaCaptureReportingDelayForTesting WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); > > Should this go in WKWebViewPrivateForTesting.h instead? Did not know about it, yes!
youenn fablet
Comment 7 2020-09-15 00:58:22 PDT
Created attachment 408799 [details] Patch for landing
EWS
Comment 8 2020-09-15 01:56:52 PDT
Committed r267081: <https://trac.webkit.org/changeset/267081> All reviewed patches have been landed. Closing bug and clearing flags on attachment 408799 [details].
Note You need to log in before you can comment on or make changes to this bug.