AppleTV Plugin Code Sample -> Local Movie Player, Sharing what I learn |
![]() |
AppleTV Plugin Code Sample -> Local Movie Player, Sharing what I learn |
|
grabberslasher
Ekky ekky ekky ekky p'tang zoom-boing <incoherent mumble&
|
![]() |
Mar 30 2007, 02:34 PM Post #1
|
![]() ![]()
|
Ok I've been working with the sample code released beforehand, and I created myself a little plugin that lists all my movies from my iMac's internal drive (where I store my movies) as I boot the AppleTV stuff from an external drive. It seems to work recursively, and the path is hardcoded, but have a go and try editing it.
The plugin will show up as "File Browser" in the main menu, and has an icon ripped from Front Row. If you use and/or extend this code, please post here with anything you discover! The project folder must be in the same folder as BackRow and iPhotoAccess, so you can symlink them in if you like.
Attached File(s)
|
|
Alex76
InsanelyMac Protégé
|
![]() |
Mar 30 2007, 02:45 PM Post #2
|
|
Hi, It's possible to use this sample plugin to create QuitPlugin ?
Like Killall ...... |
|
amok
InsanelyMac Protégé
|
![]() |
Mar 30 2007, 03:16 PM Post #3
|
|
I've just built it and everything works fine, thanks a lot!
"Amazing...!" Edit1: How can I change the "CFBundleName"-menu entry? Simply changing "${PRODUCT_NAME}"-string in info.plist to "My Local Films" doesn't work! Edit2: Ok, I've found a solution. Had to add a localization for my system language. I'm now figuring out how to change the order of menu items |
|
grabberslasher
Ekky ekky ekky ekky p'tang zoom-boing <incoherent mumble&
|
![]() |
Mar 30 2007, 04:52 PM Post #4
|
![]() ![]()
|
Well I've managed to add a menu item to quit the AppleTV shell, for those people who are running it as a standalone application and not as their Finder. All you do is paste the following bits of code between the comment block dividers into their stated places below:
In FilezMenu.m: CODE - (void)itemSelected:(long)fp8 { /* Add the following to top of said function */ if (fp8 == 0) { [[NSApplication sharedApplication] terminate:self]; return; } /* end of addition */ .... This will make the topmost item in the Files list quit the AppleTV UI when selected. Now to actually make said item say "shut down" or something: In TestMenuList.m: CODE -(TestMenuList *)initWithScene:(id)scene {
<... previous code here ...> // build objects id currentMenuItem; /* Reboot Option addition here, under currentMenuItem and before NSDirectoryEnumerator *movieDirectoryEnumerator ... etc */ [_fileListArray addObject:@" - Reboot Apple TV UI"]; currentMenuItem = [BRTextMenuItemLayer menuItemWithScene:_scene]; [currentMenuItem setTitle:@" - Reboot Apple TV UI"]; [_items addObject:currentMenuItem]; /* end of addition */ ... |
|
|
Alex76
InsanelyMac Protégé
|
![]() |
Mar 30 2007, 06:16 PM Post #5
|
|
Hi, i use mac at home. i my job is a developer " Windows
What i do download to compile the code attach ?? |
|
grabberslasher
Ekky ekky ekky ekky p'tang zoom-boing <incoherent mumble&
|
![]() |
Mar 30 2007, 06:55 PM Post #6
|
![]() ![]()
|
|
|
lessew
InsanelyMac Geek
|
![]() |
Mar 30 2007, 07:30 PM Post #7
|
![]() ![]()
|
Works like a beauty, except for the fact that my system resolution stays at 1280x800 when I exit, rather than returning to 1440x900
|
|
erica
InsanelyMac Protégé
|
![]() |
Mar 30 2007, 07:46 PM Post #8
|
|
It works fine with m4v files, but when I try to play an AVI it crashes. I've installed perian into /Library/QuickTime and rebooted, but no luck.
|
|
grabberslasher
Ekky ekky ekky ekky p'tang zoom-boing <incoherent mumble&
|
![]() |
Mar 30 2007, 07:50 PM Post #9
|
![]() ![]()
|
Interesting, it works for my avi files, half my collection is divx or xvid.
|
|
Alex76
InsanelyMac Protégé
|
![]() |
Mar 30 2007, 09:02 PM Post #10
|
|
|
|
ElBob
InsanelyMac Protégé
|
![]() |
Mar 30 2007, 09:16 PM Post #11
|
|
|
|
Alex76
InsanelyMac Protégé
|
![]() |
Mar 30 2007, 09:47 PM Post #12
|
|
Could you post your compiled version please? I have Tested on Apple Installer. 1. RightClick Appletv Application 2. dir Plugin Enter on frist voice and press Play to quit
Attached File(s)
|
|
ElBob
InsanelyMac Protégé
|
![]() |
Mar 30 2007, 09:50 PM Post #13
|
|
|
|
erica
InsanelyMac Protégé
|
![]() |
Mar 30 2007, 10:14 PM Post #14
|
|
I'm going to keep trying with other media files (and I can't wait to try the closer app) BUT...my Apple TV reset itself (by itself, darn it) and is doing a factory update and I don't want to stop the thing while it's doing that.
Just FYI I'm on an NTSC system and the item that was messing up playback was a PAL DIVX file (30 fps vs 29.97 fps). I'm not sure if that's what caused the crash problem. Or the factory reset problem. Or whether I just have earned the bad karma. |
|
Jlentz823
InsanelyMac Protégé
|
![]() |
Mar 30 2007, 11:03 PM Post #15
|
|
after i closed it it diable the keyboard link to volume. is there a quick plugin that would allow keyboard accsess. if there is anybody have a link
|
|
ibcrootbeer
InsanelyMac Protégé
|
![]() |
Mar 31 2007, 12:41 AM Post #16
|
|
The plugin will show up as "File Browser" in the main menu, and has an icon ripped from Front Row. If you use and/or extend this code, please post here with anything you discover! The project folder must be in the same folder as BackRow and iPhotoAccess, so you can symlink them in if you like. please excuse my ignorance, where exactly does the project folder "Sample Movie Lister" go? into "system/library/privateframeworks"? do i need to rename the project folder or no? (I have the ATV setup and running through the "new user" method found here: http://forum.insanelymac.com/index.php?showtopic=46680 ) |
|
grabberslasher
Ekky ekky ekky ekky p'tang zoom-boing <incoherent mumble&
|
![]() |
Mar 31 2007, 01:31 AM Post #17
|
![]() ![]()
|
please excuse my ignorance, where exactly does the project folder "Sample Movie Lister" go? into "system/library/privateframeworks"? do i need to rename the project folder or no? (I have the ATV setup and running through the "new user" method found here: http://forum.insanelymac.com/index.php?showtopic=46680 ) No the project folder includes an Xcode project which must be compiled. The compiled frappliance must then be copied into the PlugIns folder inside the AppleTV's Finder.app |
|
RevoX
InsanelyMac Protégé
|
![]() |
Mar 31 2007, 02:02 PM Post #18
|
|
Great work Grabber
|
|
Jlentz823
InsanelyMac Protégé
|
![]() |
Mar 31 2007, 02:16 PM Post #19
|
|
awesome u guys should get a plugin that allows you to minimize ATV or switchwindows. that would be awesome
|
|
ibcrootbeer
InsanelyMac Protégé
|
![]() |
Mar 31 2007, 03:05 PM Post #20
|
|
Would you take mine? (Didn't test it, hope it works) Edit: Successfully tested, but perhaps partly german. Tell me, if I've to change the localization. No the project folder includes an Xcode project which must be compiled. The compiled frappliance must then be copied into the PlugIns folder inside the AppleTV's Finder.app i just used amok's compiled film theater frapp and put it inside the plugins folder. when i ran ATV again it showed up in the menu looking great, however when i selected it, the option it gave me was to close appletv??? am i missing something? i already have the exit frapp installed which is working fine. is this an error on my part, has anyone else gotten the film theater frapp (file browser) seeing their media files on their computer? |
![]() |
|
Lo-Fi Version | Time is now: 9th February 2010 - 12:42 PM |