Question

I'm sorry if there's a post or something about this online but my googlefu is not helping me out today. I'm planning on building a mac app for my school for our announcement program. Basically if we have video announcements we play them in iTunes and mirror the display. What I want to build is a media player that you choose the video on the main screen and it outputs the video full screen on the secondary display. There is software like this but a lot of the software is $500 or more and offers way more features than needed.

My question is how do I have my program display the video on the secondary full screen without any toolbars. It's probably right in front of me. If you guys have any resources about that please let me know. It will be my first time mac an app for a mac. I'm mostly an iOS guy. If there are any tutorials on making apps for 2 screens let me know. I'm fine with the media player, that's not to hard, I'm just not sure what to do.

Was it helpful?

Solution

      //display window without any of the usual dressing
 [window setStyleMask:NSBorderlessWindowMask]; 

      //set 'z-index' of window to display on top of menubar
 [window setLevel:NSMainMenuWindowLevel+1];

      //set the window rect to the screen rect
 NSRect mainDisplayRect = [[NSScreen mainScreen] frame];
 [window setFrame:mainDisplayRect display:YES];

There's more to it than that, but it would help to see where you've got to. This approach eschews the OSX10.7+ fullscreen goodness - as you have probably worked out, it is not easy under these new fullscreen patterns to work with dual monitors. With the above method, you can control an app from one screen (retain menubar, other windows, full access to the OS) whilst playing one of its windows fullscreen on a second monitor.

By the way, the new version of iTunes brings back some dual-monitor functionality. There is a way to set it up so that you have full-screen video on one monitor whilst some degree of controlling (using the miniplayer) on a second screen.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top