The specs says: When the MediaStream state moves from the active to the inactive state, the User Agent must raise an ended event on the HTMLMediaElement and set its ended attribute to true. Note that once ended equals true the HTMLMediaElement will not play media...
Created attachment 265562 [details] Proposed patch.
Comment on attachment 265562 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=265562&action=review r=me with nits > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:216 > + static CGFloat components[4] = { 0, 0, 0, 1 }; > + static CGColorRef blackColor = CGColorCreate(CGColorSpaceCreateDeviceRGB(), components); > + m_videoBackgroundLayer.get().contents = nil; > + m_videoBackgroundLayer.get().backgroundColor = blackColor; You could also use backgroundColor = cachedCGColor(Color::black); here. > Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp:172 > + context.scale(FloatSize(1, -1)); Is it really important to flip the scale if you're just filling with black?
Created attachment 265617 [details] Patch for landing.
(In reply to comment #2) > Comment on attachment 265562 [details] > Proposed patch. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=265562&action=review > > r=me with nits > > > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:216 > > + static CGFloat components[4] = { 0, 0, 0, 1 }; > > + static CGColorRef blackColor = CGColorCreate(CGColorSpaceCreateDeviceRGB(), components); > > + m_videoBackgroundLayer.get().contents = nil; > > + m_videoBackgroundLayer.get().backgroundColor = blackColor; > > You could also use backgroundColor = cachedCGColor(Color::black); here. > Good idea, fixed. > > Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp:172 > > + context.scale(FloatSize(1, -1)); > > Is it really important to flip the scale if you're just filling with black? > Nope, fixed.
Comment on attachment 265617 [details] Patch for landing. Attachment 265617 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/438466 New failing tests: fast/mediastream/MediaStream-video-element.html
Created attachment 265627 [details] Archive of layout-test-results from ews107 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Created attachment 265644 [details] Updated patch for landing.
Comment on attachment 265644 [details] Updated patch for landing. Clearing flags on attachment: 265644 Committed r192503: <http://trac.webkit.org/changeset/192503>