Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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 YouTube.com page in a new window instead of opening it in the current one.
  • Loading branch information...
commit 26de0f0bd64fd259d96fa15bb43d3f9d87588ff5 1 parent 13b1e67
@ssp authored
Showing with 1 addition and 5 deletions.
  1. +1 −5 Plugin/Plugin.m
View
6 Plugin/Plugin.m
@@ -1354,11 +1354,7 @@ - (IBAction)loadYouTubePage:(id)sender
{
NSString* YouTubePageURL = [ NSString stringWithFormat: @"http://www.youtube.com/watch?v=%@", [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;
Please sign in to comment.
Something went wrong with that request. Please try again.