Permalink
Browse files

Open fullscreen in QT Player command now obeys the HD setting

Signed-off-by: Jonathan 'Wolf' Rentzsch <jwr.git@redshed.net>
  • Loading branch information...
1 parent 6bcf4fd commit 93544a517b18869d169bb706676471d1d1842fae Simone Manganelli committed with Jul 1, 2009
Showing with 7 additions and 1 deletion.
  1. +7 −1 Plugin/Plugin.m
View
@@ -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];

0 comments on commit 93544a5

Please sign in to comment.