Commit 67da2de6 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: updated applescript binding to current API

parent e616d0df
......@@ -26,8 +26,7 @@
*****************************************************************************/
#include "intf.h"
#include "applescript.h"
#include "controls.h"
#include "open.h"
#include "CoreInteraction.h"
/*****************************************************************************
* VLGetURLScriptCommand implementation
......@@ -94,42 +93,37 @@
return nil;
}
VLCControls * o_controls = [[VLCMain sharedInstance] controls];
if ( o_controls )
{
if ( [o_command isEqualToString:@"play"] )
{
[o_controls play:self];
[[VLCCoreInteraction sharedInstance] play];
}
else if ( [o_command isEqualToString:@"stop"] )
{
[o_controls stop:self];
[[VLCCoreInteraction sharedInstance] stop];
}
else if ( [o_command isEqualToString:@"previous"] )
{
[o_controls prev:self];
[[VLCCoreInteraction sharedInstance] previous];
}
else if ( [o_command isEqualToString:@"next"] )
{
[o_controls next:self];
[[VLCCoreInteraction sharedInstance] next];
}
else if ( [o_command isEqualToString:@"fullscreen"] )
{
[o_controls toogleFullscreen: self];
[[VLCCoreInteraction sharedInstance] toggleFullscreen];
}
else if ( [o_command isEqualToString:@"mute"] )
{
[o_controls mute:self];
[[VLCCoreInteraction sharedInstance] mute];
}
else if ( [o_command isEqualToString:@"volumeUp"] )
{
[o_controls volumeUp:self];
[[VLCCoreInteraction sharedInstance] volumeUp];
}
else if ( [o_command isEqualToString:@"volumeDown"] )
{
[o_controls volumeDown:self];
}
[[VLCCoreInteraction sharedInstance] volumeDown];
}
return nil;
}
......@@ -147,7 +141,7 @@
- (void) setScriptFullscreenMode: (BOOL) mode {
VLCControls * o_controls = [[VLCMain sharedInstance] controls];
if (mode == [o_controls isFullscreen]) return;
[o_controls toogleFullscreen: self];
[[VLCCoreInteraction sharedInstance] toggleFullscreen];
}
@end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment