Jump to content

AppleTV Plugin Code Sample -> Local Movie Player


  • Please log in to reply
33 replies to this topic

#1
grabberslasher

grabberslasher

    Ekky ekky ekky ekky p'tang zoom-boing <incoherent mumble&

  • Members
  • PipPipPip
  • 161 posts
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 Files



#2
Alex76

Alex76

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 4 posts
Hi, It's possible to use this sample plugin to create QuitPlugin ?

Like Killall ......

#3
amok

amok

    InsanelyMac Protégé

  • Members
  • Pip
  • 10 posts
I've just built it and everything works fine, thanks a lot!

"Amazing...!" :rolleyes:

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

#4
grabberslasher

grabberslasher

    Ekky ekky ekky ekky p'tang zoom-boing <incoherent mumble&

  • Members
  • PipPipPip
  • 161 posts
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:

- (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:

-(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 */

...


#5
Alex76

Alex76

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 4 posts
Hi, i use mac at home. i my job is a developer " Windows :( " ...
What i do download to compile the code attach ??

#6
grabberslasher

grabberslasher

    Ekky ekky ekky ekky p'tang zoom-boing <incoherent mumble&

  • Members
  • PipPipPip
  • 161 posts

Hi, i use mac at home. i my job is a developer " Windows :( " ...
What i do download to compile the code attach ??


You need to install Xcode from the discs that came with your Mac, or download it from developer.apple.com

#7
lessew

lessew

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 133 posts
Works like a beauty, except for the fact that my system resolution stays at 1280x800 when I exit, rather than returning to 1440x900

#8
erica

erica

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts
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.

#9
grabberslasher

grabberslasher

    Ekky ekky ekky ekky p'tang zoom-boing <incoherent mumble&

  • Members
  • PipPipPip
  • 161 posts
Interesting, it works for my avi files, half my collection is divx or xvid.

#10
Alex76

Alex76

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 4 posts

You need to install Xcode from the discs that came with your Mac, or download it from developer.apple.com


Tnk's GREAT.. !!
I mod the sample code.. Now i CAN quit from ATV with remote control.

Byz

#11
ElBob

ElBob

    InsanelyMac Protégé

  • Members
  • Pip
  • 9 posts

Tnk's GREAT.. !!
I mod the sample code.. Now i CAN quit from ATV with remote control.

Byz


Could you post your compiled version please?

#12
Alex76

Alex76

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 4 posts

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 Files



#13
ElBob

ElBob

    InsanelyMac Protégé

  • Members
  • Pip
  • 9 posts

Would you take mine? :tomato:

(Didn't test it, hope it works)

Edit: Successfully tested, but perhaps partly german. Tell me, if I've to change the localization.


Sweet dude, works like a charm.

#14
erica

erica

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts
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.

#15
Jlentz823

Jlentz823

    InsanelyMac Protégé

  • Members
  • Pip
  • 26 posts
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

#16
ibcrootbeer

ibcrootbeer

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts

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.insanel...showtopic=46680 )

#17
grabberslasher

grabberslasher

    Ekky ekky ekky ekky p'tang zoom-boing <incoherent mumble&

  • Members
  • PipPipPip
  • 161 posts

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.insanel...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

#18
RevoX

RevoX

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
  • Location:Canada
Great work Grabber

#19
Jlentz823

Jlentz823

    InsanelyMac Protégé

  • Members
  • Pip
  • 26 posts
awesome u guys should get a plugin that allows you to minimize ATV or switchwindows. that would be awesome

#20
ibcrootbeer

ibcrootbeer

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts

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? :unsure:





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2016 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy