NSString *state = [self runScriptAndReturnResult:@"return player state"];
if ([state isEqualToString:@"playing"]) {
[self sendAEWithEventClass:'hook' andEventID:'Paus'];
NSString *state = [self runScriptAndReturnResult:@"return player state"];
if ([state isEqualToString:@"playing"]) {
[self sendAEWithEventClass:'hook' andEventID:'Paus'];