Luke 42077 Posted February 27, 2019 Posted February 27, 2019 Haven't had a chance to look at this yet but please be aware this would only be a convience method. Everything is already there in the api for you to resume video.
chef 3810 Posted February 27, 2019 Posted February 27, 2019 To resume media, you have to look at the items resume state, which is a boolean value if it is resumable, from a bookmarked location. Then there is a value available when requesting specific item info with a resume point. I have my Alexa skill tell me if a movie is book marked and asks if I want it to resume. I can post code here with more specific routines if that helps anyone. I have it working perfectly though.
PrincessClevage 175 Posted February 27, 2019 Author Posted February 27, 2019 (edited) To resume media, you have to look at the items resume state, which is a boolean value if it is resumable, from a bookmarked location. Then there is a value available when requesting specific item info with a resume point. I have my Alexa skill tell me if a movie is book marked and asks if I want it to resume. I can post code here with more specific routines if that helps anyone. I have it working perfectly though. Hi Chef,Currently I can not get the resume last playing movie to work from Rigpapa’s Vera > Emby app. The use and flow is as follows: Motion sensor is triggered during armed window and main emby client or Xbox client are active and house is home or night mode then play relevant camera feed from your Surveillance plugin for emby to active client. After Surveillance camera is stopped the resume previously playing media (usually movie for me but Rigpapa has stated that playlist etc can not be resumed, see his previous post in this thread). I have everything working except for the last resume part, might this be something you can simulate with your setup? Edited February 27, 2019 by PrincessClevage
BillOatman 596 Posted March 6, 2019 Posted March 6, 2019 To resume media, you have to look at the items resume state, which is a boolean value if it is resumable, from a bookmarked location. Then there is a value available when requesting specific item info with a resume point. I have my Alexa skill tell me if a movie is book marked and asks if I want it to resume. I can post code here with more specific routines if that helps anyone. I have it working perfectly though. Is your Alexa skill the Emby Alexa skill? The link in your footer gives a 404 error
hooray4me 52 Posted March 14, 2019 Posted March 14, 2019 How do I determine the StartPositionTicks value?
Luke 42077 Posted March 14, 2019 Posted March 14, 2019 The user's last position will be in the item.UserData object.
hooray4me 52 Posted March 14, 2019 Posted March 14, 2019 oh. Is there a way to select playback position or chapter scene selection from the api?
Luke 42077 Posted March 15, 2019 Posted March 15, 2019 Yes, our remote control API supports sending any start position you want: https://github.com/MediaBrowser/Emby/wiki/Remote-control
BillOatman 596 Posted March 15, 2019 Posted March 15, 2019 I was thinking of starting another thread, but this question fits here Your remote control link shows to play media, /Sessions/{Id}/Playing The ,NET api equivalent seems to be SendPlayCommandAsync() Part of what you pass in is public string[] ItemIds Is the purpose of an array of item IDs to play media sequentially, like a pre-roll followed by a movie for example?
hooray4me 52 Posted March 17, 2019 Posted March 17, 2019 @@Luke I'm having an issue with launching a show from the api for a FireTV stick. The show will launch/play but the menu options and loading circle stay on the screen and then the app crashes after about 30 seconds. I launch the show with this command (variable values excluded): curl -X POST "http://tv.xxxxx.xxx:8096/emby/Sessions/$Session/Playing?ItemIds=$Show&PlayCommand=PlayNow&api_key=$Token" -H "accept: */*" \ -H "Content-Type: application/json" -d "{\"ControllingUserId\":\"$UserId\",\"SubtitleStreamIndex\":0,\"AudioStreamIndex\":0,\"StartIndex\":0}" logs attached... thoughts? server.log
hooray4me 52 Posted March 17, 2019 Posted March 17, 2019 @@ebr thoughts? @@Luke I'm having an issue with launching a show from the api for a FireTV stick. The show will launch/play but the menu options and loading circle stay on the screen and then the app crashes after about 30 seconds. I launch the show with this command (variable values excluded): curl -X POST "http://tv.xxxxx.xxx:8096/emby/Sessions/$Session/Playing?ItemIds=$Show&PlayCommand=PlayNow&api_key=$Token" -H "accept: */*" \ -H "Content-Type: application/json" -d "{\"ControllingUserId\":\"$UserId\",\"SubtitleStreamIndex\":0,\"AudioStreamIndex\":0,\"StartIndex\":0}" logs attached... thoughts?
Luke 42077 Posted March 18, 2019 Posted March 18, 2019 If he doesn't see this then I would open a topic in the Android TV section. Thanks.
hooray4me 52 Posted March 18, 2019 Posted March 18, 2019 (edited) oh. Is there a way to select playback position or chapter scene selection from the api? Yes, our remote control API supports sending any start position you want: https://github.com/MediaBrowser/Emby/wiki/Remote-control Can you provide an example of playing item 11111 at like the 5 minute mark? The wiki is pretty vague on that. http://tv.xxxxx.xxx:8096/emby/Sessions/someusersession/Playing?ItemIds=111111&PlayCommand=PlayNow&api_key=xxxxxxxxxxx &somecommand=300seconds ? Edited March 18, 2019 by robrhedrick
hooray4me 52 Posted March 18, 2019 Posted March 18, 2019 I think it might be a problem with older fire sticks. I do my dev stuff on an older gen 1 or gen 2 device. I tried this on a newer one and it worked perfectly. @@Luke I'm having an issue with launching a show from the api for a FireTV stick. The show will launch/play but the menu options and loading circle stay on the screen and then the app crashes after about 30 seconds. I launch the show with this command (variable values excluded): curl -X POST "http://tv.xxxxx.xxx:8096/emby/Sessions/$Session/Playing?ItemIds=$Show&PlayCommand=PlayNow&api_key=$Token" -H "accept: */*" \ -H "Content-Type: application/json" -d "{\"ControllingUserId\":\"$UserId\",\"SubtitleStreamIndex\":0,\"AudioStreamIndex\":0,\"StartIndex\":0}" logs attached... thoughts?
Luke 42077 Posted March 18, 2019 Posted March 18, 2019 Using the chrome debugger is a great way to see examples, this will show you how the web app is doing it: http://localhost:8096/emby/Sessions/9f0b9e07a63e6773fb13b1f1d6220f74/Playing?ItemIds=22651&PlayCommand=PlayNow&MediaSourceId=8d54f6e8461cacbbfcdb9040cdeb2267&AudioStreamIndex=1&SubtitleStreamIndex=4 1
PrincessClevage 175 Posted April 13, 2019 Author Posted April 13, 2019 Haven't had a chance to look at this yet but please be aware this would only be a convience method. Everything is already there in the api for you to resume video.Hi Luke,I now have the resume functionality working after armed security camera is triggered it plays automatically on either of my two main emby clients if they are active and streaming video (usually a movie) but when I stop the security camera footage and go back to previously playing media it auto starts the security camera footage again. I assume it is doing this because the security camera footage was the last recorded playing media, is it possible to auto resume previously playing footage (prior to the auto stream of the security camera footage e.g resume previously playing movie)?
PrincessClevage 175 Posted April 13, 2019 Author Posted April 13, 2019 Are these video files?My current testing has been video files yes but future state could be music also.
Luke 42077 Posted April 13, 2019 Posted April 13, 2019 Ok, we'd have to look at an example in detail. And if this involves some code written by you or someone else, then that also means making sure the api is being used correctly. Thanks.
hooray4me 52 Posted May 2, 2019 Posted May 2, 2019 I finally got all of this working inside Home Assistant. I have an automation that will launch emby on a certain firestick, play a movie and turn on the tv at a set time. Message me if you'd like the details. 1
Senna 368 Posted May 6, 2019 Posted May 6, 2019 @@LukeWhat has changed in Emby API access, because just installed 4.2.0.4 and it broke MrMC's Emby Client service access. Did a quick test reverting back to 4.2.0.1 and MrMC API access works in there.
Luke 42077 Posted May 6, 2019 Posted May 6, 2019 @@Luke What has changed in Emby API access, because just installed 4.2.0.4 and it broke MrMC's Emby Client service access. Did a quick test reverting back to 4.2.0.1 and MrMC API access works in there. Nothing that I can think of. Remember you said the same thing during 4.1 development.
Senna 368 Posted May 6, 2019 Posted May 6, 2019 Nothing that I can think of. Remember you said the same thing during 4.1 development. No, that was in 4.0.0.x branch, which they resolved around end of January 2019 and the problem then, was only for Emby users which had remote access disabled, which broke manual sign-in from MrMC's Emby Client service due to MrMC also expecting wan address from Emby server when connecting to it. So in complete 4.1.x branch and 4.2.x branch, MrMC's Emby access was working normally with every beta server version, but not with the latest 4.2.0.4 (on my system with local and remote Emby access with domain). Will check with MrMC devs, to let them install latest Emby beta and so they can check their problem now, with MrMC's API access to Emby server.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now