Jump to content

FR Remote Control - Seek (Relative vs Absolute)


rhodges

Recommended Posts

rhodges

https://github.com/MediaBrowser/Emby/wiki/Remote-control

 

I'm actually using, in my own plugin

 

Snip:

 

...

 

r.Command = PlaystateCommand.Seek;
r.SeekPositionTicks = request.Arguments?.GetValue("SeekPositionTicks", () => "0").ToInt64();
 

session.SessionController.SendPlaystateCommand(r, CancellationToken.None);

 

I haven't tested a lot, but what I see, it seems to be absolute. That is, if I am 1hr in the movie, and I send 5m of ticks, sets the movie to the 5m mark, aka absolute position.

 

Could a flag be added to the command, to turn it into relative position? Meaning, if I am 1hr into a movie, and I send 5m relative, it jumps to 1:05?

 

Of course, clients will need to be adjusted to handle this as well because really, they are the ones skipping. I could, as a workaround, look at the current position and adjust that way, but since clients vary when the report in, the current server position is not accurate.

 

Why am I asking for all this? I am working on my own Alexa plugin. I would be nice to say something like, skip 5 minutes, or skip 10 minutes, or skip 1 minute, etc, etc.

 

Note: I have not tried, but maybe this is supported with rewind/fastforward? I am not in a position to try now, but maybe they work with the SeekPositionTicks argument? I poked around the source briefly but didn't see anything. That might be a better place to put it now that I think about it.

Link to comment
Share on other sites

It's a good idea yes. Will you be releasing this to the public? I think it would make some Alexa owners very happy.

Link to comment
Share on other sites

rhodges

I thought about it, but what I have is part of a bigger API I have for home automation. I could simplify it and roll it into a server plugin, but there is still the skill that has to be hosted somewhere. Would the emby.media infrastructure be powerful enough to host the skill?

 

In a nutshell, there would be a single skill, hosted somewhere. The emby plugin would make a persistent connection to this hosted skill. I have no idea what the load would be for the server(s) hosting the skill.

Link to comment
Share on other sites

rhodges

If no one comes up with one before me, I might pull what I'm doing out into it's own plugin and put the plugin and skill on github. Would you mind letting me know your preference for hosting the skill? It is basically a webapi, so the choice is yours.  IIS or a windows service hosting aspnetcore, owin, whatever.

Link to comment
Share on other sites

rhodges

Ok. I have some reading to do on account linking and all the stuff needed to tie things together. If I get a chance to put some serious time into it, I'll be sure to post progress and links to source. No promises.  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...