Skip to content
Browse files

Open YouTube page via WebKit rather than NSWorkspace.

No idea whether this is the _right_ thing to do but it certainly improves the behaviour in applications like NewsFire or BibDesk.

»Philosophically« the issue seems to be that going through NSWorkspace will send an AppleEvent to open the URL. If the application doesn't support the open URL AppleEvent, things start behaving strangely.

A further question would be whether it’d be preferable to open the page in a new window instead of opening it in the current one.
  • Loading branch information...
1 parent 13b1e67 commit 26de0f0bd64fd259d96fa15bb43d3f9d87588ff5 @ssp committed
Showing with 1 addition and 5 deletions.
  1. +1 −5 Plugin/Plugin.m
6 Plugin/Plugin.m
@@ -1354,11 +1354,7 @@ - (IBAction)loadYouTubePage:(id)sender
NSString* YouTubePageURL = [ NSString stringWithFormat: @"", [self videoId] ];
- [[NSWorkspace sharedWorkspace] openURLs:[NSArray arrayWithObject:[NSURL URLWithString:YouTubePageURL]]
- withAppBundleIdentifier:[self launchedAppBundleIdentifier]
- options:NSWorkspaceLaunchDefault
- additionalEventParamDescriptor:[NSAppleEventDescriptor nullDescriptor]
- launchIdentifiers:nil];
+ [_webView setMainFrameURL:YouTubePageURL];
- (IBAction)openFullscreenInQTPlayer:(id)sender;

0 comments on commit 26de0f0

Please sign in to comment.
Something went wrong with that request. Please try again.