Skip to content

Commit

Permalink
Open fullscreen in QT Player command now obeys the HD setting
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan 'Wolf' Rentzsch <jwr.git@redshed.net>
  • Loading branch information
Simone Manganelli authored and rentzsch committed Jul 1, 2009
1 parent 6bcf4fd commit 93544a5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Plugin/Plugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -1236,8 +1236,14 @@ - (IBAction)openFullscreenInQTPlayer:(id)sender;
NSString* video_id = [self videoId];
NSString* video_hash = [ self _videoHash ];

NSString* src = [ NSString stringWithFormat: @"http://www.youtube.com/get_video?fmt=18&video_id=%@&t=%@",
NSString *src;
if ([[CTFUserDefaultsController standardUserDefaults] boolForKey:sUseYouTubeHDH264DefaultsKey]) {
src = [ NSString stringWithFormat: @"http://www.youtube.com/get_video?fmt=22&video_id=%@&t=%@",
video_id, video_hash ];
} else {
src = [ NSString stringWithFormat: @"http://www.youtube.com/get_video?fmt=18&video_id=%@&t=%@",
video_id, video_hash ];
}

NSString *scriptSource = [NSString stringWithFormat:
@"tell application \"QuickTime Player\"\nactivate\ngetURL \"%@\"\nrepeat while (display state of front document is not presentation)\ndelay 1\npresent front document scale screen\nend repeat\nrepeat while (playing of front document is false)\ndelay 1\nplay front document\nend repeat\nend tell",src];
Expand Down

0 comments on commit 93544a5

Please sign in to comment.