Bug 160405

Summary: [Mac][iOS] Adopt MediaRemote "seek to playback position"
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch.
dino: review+
Updated patch for the bots. none

Description Eric Carlson 2016-08-01 08:28:24 PDT
Adopt MediaRemote "seek to playback position"
Comment 1 Eric Carlson 2016-08-01 08:30:08 PDT
<rdar://problem/27547583>
Comment 2 Eric Carlson 2016-08-01 10:23:10 PDT
Created attachment 285019 [details]
Proposed patch.
Comment 3 WebKit Commit Bot 2016-08-01 10:29:17 PDT
Attachment 285019 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/ios/RemoteCommandListenerIOS.mm:115:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebCore/platform/audio/PlatformMediaSession.h:134:  The parameter name "argument" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 2 in 21 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Dean Jackson 2016-08-01 11:46:19 PDT
Comment on attachment 285019 [details]
Proposed patch.

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

> Source/WebCore/platform/mac/RemoteCommandListenerMac.mm:129
> +            CFNumberRef positionRef = static_cast<CFNumberRef>(CFDictionaryGetValue(options, kMRMediaRemoteOptionPlaybackPosition));
> +            if (positionRef)
> +                CFNumberGetValue(positionRef, kCFNumberDoubleType, &argument.asDouble);
> +            platformCommand = PlatformMediaSession::SeekToPlaybackPositionCommand;

Does this mean that if you can't get the playback position, you'll seek to the start?
Comment 5 Eric Carlson 2016-08-01 12:03:00 PDT
Comment on attachment 285019 [details]
Proposed patch.

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

>> Source/WebCore/platform/mac/RemoteCommandListenerMac.mm:129
>> +            platformCommand = PlatformMediaSession::SeekToPlaybackPositionCommand;
> 
> Does this mean that if you can't get the playback position, you'll seek to the start?

Good point, I will fix that.
Comment 6 Eric Carlson 2016-08-01 12:03:25 PDT
Created attachment 285024 [details]
Updated patch for the bots.
Comment 7 WebKit Commit Bot 2016-08-01 12:05:14 PDT
Attachment 285024 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/ios/RemoteCommandListenerIOS.mm:118:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebCore/platform/audio/PlatformMediaSession.h:134:  The parameter name "argument" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 2 in 21 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Eric Carlson 2016-08-01 12:51:29 PDT
Committed r203982: http://trac.webkit.org/changeset/203982
Comment 9 Eric Carlson 2016-08-03 09:35:54 PDT
Plus r204082 to fix a problem on iOS.
Comment 10 Eric Carlson 2016-08-11 09:36:38 PDT
And r204375 to update MediaRemoteSPI.h