- playlist_t * p_playlist = pl_Get( p_intf );
- if( p_playlist == NULL )
- {
- return nil;
- }
-
- VLCControls * o_controls = [[VLCMain sharedInstance] controls];
-
- if ( o_controls )
- {
- if ( [o_command isEqualToString:@"play"] )
- {
- [o_controls play:self];
- }
- else if ( [o_command isEqualToString:@"stop"] )
- {
- [o_controls stop:self];
- }
- else if ( [o_command isEqualToString:@"previous"] )
- {
- [o_controls prev:self];
- }
- else if ( [o_command isEqualToString:@"next"] )
- {
- [o_controls next:self];
- }
- else if ( [o_command isEqualToString:@"fullscreen"] )
- {
- [o_controls toogleFullscreen: self];
- }
- else if ( [o_command isEqualToString:@"mute"] )
- {
- [o_controls mute:self];
- }
- else if ( [o_command isEqualToString:@"volumeUp"] )
- {
- [o_controls volumeUp:self];
- }
- else if ( [o_command isEqualToString:@"volumeDown"] )
- {
- [o_controls volumeDown:self];
- }
+ playlist_t * p_playlist = pl_Get(p_intf);
+
+ if ([o_command isEqualToString:@"play"])
+ [[VLCCoreInteraction sharedInstance] playOrPause];
+ else if ([o_command isEqualToString:@"stop"])
+ [[VLCCoreInteraction sharedInstance] stop];
+ else if ([o_command isEqualToString:@"previous"])
+ [[VLCCoreInteraction sharedInstance] previous];
+ else if ([o_command isEqualToString:@"next"])
+ [[VLCCoreInteraction sharedInstance] next];
+ else if ([o_command isEqualToString:@"fullscreen"])
+ [[VLCCoreInteraction sharedInstance] toggleFullscreen];
+ else if ([o_command isEqualToString:@"mute"])
+ [[VLCCoreInteraction sharedInstance] setMute: YES];
+ else if ([o_command isEqualToString:@"volumeUp"])
+ [[VLCCoreInteraction sharedInstance] volumeUp];
+ else if ([o_command isEqualToString:@"volumeDown"])
+ [[VLCCoreInteraction sharedInstance] volumeDown];
+ else if ([o_command isEqualToString:@"stepForward"]) {
+ //default: forwardShort
+ if (o_parameter) {
+ int i_parameter = [o_parameter intValue];
+ switch (i_parameter) {
+ case 1:
+ [[VLCCoreInteraction sharedInstance] forwardExtraShort];
+ break;
+ case 2:
+ [[VLCCoreInteraction sharedInstance] forwardShort];
+ break;
+ case 3:
+ [[VLCCoreInteraction sharedInstance] forwardMedium];
+ break;
+ case 4:
+ [[VLCCoreInteraction sharedInstance] forwardLong];
+ break;
+ default:
+ [[VLCCoreInteraction sharedInstance] forwardShort];
+ break;
+ }
+ } else
+ [[VLCCoreInteraction sharedInstance] forwardShort];
+ } else if ([o_command isEqualToString:@"stepBackward"]) {
+ //default: backwardShort
+ if (o_parameter) {
+ int i_parameter = [o_parameter intValue];
+ switch (i_parameter) {
+ case 1:
+ [[VLCCoreInteraction sharedInstance] backwardExtraShort];
+ break;
+ case 2:
+ [[VLCCoreInteraction sharedInstance] backwardShort];
+ break;
+ case 3:
+ [[VLCCoreInteraction sharedInstance] backwardMedium];
+ break;
+ case 4:
+ [[VLCCoreInteraction sharedInstance] backwardLong];
+ break;
+ default:
+ [[VLCCoreInteraction sharedInstance] backwardShort];
+ break;
+ }
+ } else
+ [[VLCCoreInteraction sharedInstance] backwardShort];