1. No user installed addons are supported, python or otherwise.
2. No, they really are not supported.
3. They are not coming back
4. Read from 1. again

Any mention of illegal streaming sites, addons or any pirated material will not be tolerated. This is not democracy and any offenders will be banned and posts deleted immediately without warning.

Other than that, we hope you enjoy MrMC so far and we welcome any input and feedback you might have.

Team MrMC.

Harmony Touch RW and FF

Any issues that are tvOS specific
LastStarfighter
Posts: 13
Joined: 28 Dec 2015, 08:42

Harmony Touch RW and FF

Post by LastStarfighter »

Hi

I can't seem to find an answer, hence this post.

I am using a Harmony Touch remote with the ATV 4. I only just noticed that the rw & ff buttons on the remote don't seem to work with MrMC.

I have them mapped correctly through MyHarmony and it works with other apps on the ATV 4.

Is this a common issue with MrMC?

Cheers
LS
User avatar
amet
Team MrMC
Posts: 3787
Joined: 26 Oct 2015, 16:59
Location: Dubai/Novi Sad

Re: Harmony Touch RW and FF

Post by amet »

It all depends How they are mapped and which harmony profile you are using. Have you mapped those keys in Apple TV remote setup?

If you let me know above, with sending a log when you trying to use those buttons I could try to reproduce here and fix.
LastStarfighter
Posts: 13
Joined: 28 Dec 2015, 08:42

Re: Harmony Touch RW and FF

Post by LastStarfighter »

Hi Amet

When I had Kodi on the ATV 2, I used the Harmony remote software to do the mapping and all worked well.

So for the ATV 4 I've just mapped the keys via the Harmony remote software, choosing the ATV 4 as the device.

I'm not sure of any other way to map, or what you mean by mapping in the Apple Tv remote setup?

The rw & ff keys work fine when say watching a movie through iTunes on the ATV 4.

I've added the log as well.

http://pastebin.com/NZYCMM3K

Cheers
LS
User avatar
amet
Team MrMC
Posts: 3787
Joined: 26 Oct 2015, 16:59
Location: Dubai/Novi Sad

Re: Harmony Touch RW and FF

Post by amet »

hey,

Regular Siri Apple remote doesn't have rw/ff buttons and I am not sure what harmony adds them as.

This is what I meant as mapping, all those should work fine with MrMC. https://support.apple.com/en-ae/HT201856

I'll add Apple TV as remote on my harmony and test, will let you know
Antibus
Posts: 36
Joined: 02 Feb 2016, 22:54

Re: Harmony Touch RW and FF

Post by Antibus »

I'm using an Onkyo remote that I've learned via the ATV Remote setup and everything works OK except for skip forward and skip backwards.

I've got some code that adds that functionality if you're interested.
User avatar
amet
Team MrMC
Posts: 3787
Joined: 26 Oct 2015, 16:59
Location: Dubai/Novi Sad

Re: Harmony Touch RW and FF

Post by amet »

sure, lets see it.. thanks!

EDIT: @LastStarfighter just to be clear, we are talking about fast forward and rewind, not skip forward/back? fast forward and rewind works fine here, but its mapped in such way that you have to hold it, while you hold it does rw or ff .. when you let go it continues playing.
Antibus
Posts: 36
Joined: 02 Feb 2016, 22:54

Re: Harmony Touch RW and FF

Post by Antibus »

Should I post the code here or is there a better place?
User avatar
davilla
Team MrMC
Posts: 4377
Joined: 26 Oct 2015, 17:01

Re: Harmony Touch RW and FF

Post by davilla »

Antibus wrote:Should I post the code here or is there a better place?
a PR against mrmc github repo is best. next would be a diff -rupN and post the file somewhere. baring that, as long as the changes are not too big, in the forum.
Antibus
Posts: 36
Joined: 02 Feb 2016, 22:54

Re: Harmony Touch RW and FF

Post by Antibus »

davilla wrote:
Antibus wrote:Should I post the code here or is there a better place?
a PR against mrmc github repo is best. next would be a diff -rupN and post the file somewhere. baring that, as long as the changes are not too big, in the forum.
I'm not comfortable enough with the code to do a PR - I just barely understand how MrMC/Kodi works to think that I'm even doing the right thing! Also, I'd like the skip-forward/skip-backward to simply do an immediate skip of about 10 seconds (like it does with TvOS) and I haven't figured out how to do that yet. So with that in mind, here's a diff of mrmc/xbmc/platform/darwin/tvos/MainController.mm:

@@ -44,6 +44,7 @@

#import <MediaPlayer/MPMediaItem.h>
#import <MediaPlayer/MPNowPlayingInfoCenter.h>
+#import <MediaPlayer/MPRemoteCommandCenter.h>

using namespace KODI::MESSAGING;

@@ -1133,7 +1134,28 @@ MainController *g_xbmcController;
[super viewDidAppear:animated];
[self becomeFirstResponder];
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
+
+ MPRemoteCommandCenter *remoteCommandCenter = [MPRemoteCommandCenter sharedCommandCenter];
+ [[remoteCommandCenter skipForwardCommand] addTarget:self action:@selector(skipForward)];
+ [[remoteCommandCenter skipBackwardCommand] addTarget:self action:@selector(skipBackward)];
+}
+
+-(void)skipForward
+{
+ [self sendKeyDownUp:XBMCK_RIGHT];
+
+ // start remote timeout
+ [self startRemoteTimer];
+}
+
+-(void)skipBackward
+{
+ [self sendKeyDownUp:XBMCK_LEFT];
+
+ // start remote timeout
+ [self startRemoteTimer];
}
+
//--------------------------------------------------------------
- (void)viewWillDisappear:(BOOL)animated
{
@@ -1146,6 +1168,10 @@ MainController *g_xbmcController;
[[UIApplication sharedApplication] endReceivingRemoteControlEvents];
[self resignFirstResponder];
[super viewDidUnload];
+
+ [[UIApplication sharedApplication] endReceivingRemoteControlEvents];
+ [self resignFirstResponder];
+ [super viewDidUnload];
}
//--------------------------------------------------------------
- (UIView *)inputView

MPRemoteCommandCenter is the key to getting the skipForward and skipBackward commands (and might be a good method for some of the remote keys). To get it to actually do something, I copied the code from the left and right arrow presses. I don't understand the messaging system to do much more. Hopefully you can make some improvements on this.
User avatar
amet
Team MrMC
Posts: 3787
Joined: 26 Oct 2015, 16:59
Location: Dubai/Novi Sad

Re: Harmony Touch RW and FF

Post by amet »

here is the code we are using, its more universal and applies to chapters as well as skips to a next song, we have to have "next/prev" somehow.

https://github.com/MrMC/mrmc/blob/maste ... r.mm#L1478
Post Reply