Bug 146460

Summary: Media Session: implement algorithm for updating a media element's session (6.1)
Product: WebKit Reporter: Matt Rajca <mrajca>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: conrad_shultz, eric.carlson, jer.noble, mrajca, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 145411    
Attachments:
Description Flags
Patch darin: review+

Description Matt Rajca 2015-06-30 10:24:46 PDT
In addition to keeping track of the new media session, we should:

- pause the media element if it is 'active' in the current media session
- remove the element from the current media session
- release the current media session if there are no more active media elements
- set the default media session if the new media session is null
- update the 'kind' attribute to match the kind of the new media session
Comment 1 Radar WebKit Bug Importer 2015-06-30 10:30:11 PDT
<rdar://problem/21613814>
Comment 2 Matt Rajca 2015-06-30 10:44:20 PDT
Created attachment 255831 [details]
Patch
Comment 3 Darin Adler 2015-06-30 11:01:25 PDT
Comment on attachment 255831 [details]
Patch

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

> Source/WebCore/html/HTMLMediaElement.cpp:6490
> +    ASSERT_ARG(session, session);

If the function requires a non-null pointer, then the type it takes should be MediaSession&, not MediaSession*.
Comment 4 Matt Rajca 2015-06-30 11:10:05 PDT
(In reply to comment #3)
> Comment on attachment 255831 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=255831&action=review
> 
> > Source/WebCore/html/HTMLMediaElement.cpp:6490
> > +    ASSERT_ARG(session, session);
> 
> If the function requires a non-null pointer, then the type it takes should
> be MediaSession&, not MediaSession*.

Fixed.
Comment 5 Matt Rajca 2015-06-30 11:12:08 PDT
Committed r186123: <http://trac.webkit.org/changeset/186123>