Bug 146460 - Media Session: implement algorithm for updating a media element's session (6.1)
Summary: Media Session: implement algorithm for updating a media element's session (6.1)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 145411
  Show dependency treegraph
 
Reported: 2015-06-30 10:24 PDT by Matt Rajca
Modified: 2015-06-30 11:12 PDT (History)
5 users (show)

See Also:


Attachments
Patch (5.78 KB, patch)
2015-06-30 10:44 PDT, Matt Rajca
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>