| Summary: | [MSE][Mac] Media does not generate 'ended' event when playing to duration. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Jer Noble <jer.noble> | ||||||
| Component: | New Bugs | Assignee: | Jer Noble <jer.noble> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | commit-queue, eric.carlson, glenn, philipj, sergio | ||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Jer Noble
2014-06-02 09:47:05 PDT
Created attachment 232387 [details]
Patch
Comment on attachment 232387 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=232387&action=review > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:325 > + if (currentMediaTime() >= m_mediaSourcePrivate->duration()) { > + effectiveRateChanged(); > + return; > + } Do you want to post a rate changed notification if this is called when the rate is non-zero? > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:606 > + if (!m_mediaSourcePrivate) > + return; > + > + if (m_durationObserver) > + [m_synchronizer removeTimeObserver:m_durationObserver.get()]; Is there any reason to keep the observer for the (potentially invalid) duration if m_mediaSourcePrivate is NULL? (In reply to comment #2) > (From update of attachment 232387 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=232387&action=review > > > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:325 > > + if (currentMediaTime() >= m_mediaSourcePrivate->duration()) { > > + effectiveRateChanged(); > > + return; > > + } > > Do you want to post a rate changed notification if this is called when the rate is non-zero? Well, it doesn't hurt anything, but I guess the explicit notification isn't necessary. > > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:606 > > + if (!m_mediaSourcePrivate) > > + return; > > + > > + if (m_durationObserver) > > + [m_synchronizer removeTimeObserver:m_durationObserver.get()]; > > Is there any reason to keep the observer for the (potentially invalid) duration if m_mediaSourcePrivate is NULL? Nope, I'll switch the order of these stanzas. Created attachment 232391 [details]
Patch for landing
Committed r169536 <http://trac.webkit.org/changeset/169536>. |