Cocoa webview - html5 fullscreen video not working

I am trying to create an osx cocoa application with integrated webkit webview to display a webpage.

The web page contains html5 video elements that the user must be able to play in full screen mode. But full-screen mode simply shows a black screen on a mountain lion (10.8.2), the sound is still playing, but it worked on osx lion, is this a mistake or I missed something.

Minimum sample:

Steps:

Create a cocoa application, add a web view, connect the "web" property and add the webkit infrastructure

the code:

#AppDelegate.h

#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>

@interface AppDelegate : NSObject <NSApplicationDelegate>
@property (assign) IBOutlet NSWindow *window;
@property (weak) IBOutlet WebView *web;
@end

#AppDelegate.m

#import "AppDelegate.h"

@implementation AppDelegate

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
  NSString *html = @"<html><body><video src=\"http://video-js.zencoder.com/oceans-clip.mp4\" controls></body></html>";
  [[self.web mainFrame] loadHTMLString:html baseURL:nil];
}
@end

FIXED IN OSX 10.8.3:

The problem is apparently fixed in OSX 10.8.3, now full-screen mode works, even without the sandbox, as it was before OSX 10.8.2

+5
2

, . .

, , WebKit. , . ( 10.8.2)

- , :

enter image description here

+1

, , u.. iphone, , osx

UIWebView *webView;

NSString *html = @"<html><body><video src=\"http://video-js.zencoder.com/oceans-clip.mp4\" controls></body></html>";

webView =[[UIWebView alloc] initWithFrame:CGRectMake(14, 57, 670, 675)];
        [webView loadHTMLString:html baseURL:nil];
[self.view addSubview:webView];
-2

All Articles