Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import "Test.h"
- @implementation Test
- - (void) applicationDidFinishLaunching: (id) unused
- {
- //[UIHardware _setStatusBarHeight:0.0f];
- [self setStatusBarMode:4 orientation:0 duration:0.0f fenceID:0];
- //[self setStatusBarShowsProgress:true];
- UIWindow *window = [[UIWindow alloc] initWithContentRect: [UIHardware fullScreenApplicationContentRect]];
- [window orderFront: self];
- [window makeKey: self];
- UIView *view = [[UIView alloc] init];
- [window setContentView:view];
- AVController *controller = [[AVController alloc] init];
- [controller setLayer:[view _layer]];
- //[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieFinishedPlaying:) name:@”AVController_ItemPlaybackDidEnd” object:controller];
- NSError *error;
- AVItem *item = [[AVItem alloc] initWithPath:@"/var/root/how.mp4" error:&error];
- [controller setCurrentItem:item preservingRate:NO];
- [controller play:nil];
- }
- -(void)movieFinishedPlaying:(NSNotification *)notification
- {
- [self terminate];
- }
- @end
Add Comment
Please, Sign In to add comment