Jump to content


Photo

Emby Server api


  • Please log in to reply
90 replies to this topic

#81 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 121725 posts
  • Local time: 10:53 PM

Posted 14 March 2019 - 02:01 AM

The user's last position will be in the item.UserData object.



#82 robrhedrick OFFLINE  

robrhedrick

    Advanced Member

  • Members
  • 105 posts
  • Local time: 09:53 PM
  • LocationKansas

Posted 14 March 2019 - 09:58 AM

oh. Is there a way to select playback position or chapter scene selection from the api?



#83 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 121725 posts
  • Local time: 10:53 PM

Posted 15 March 2019 - 01:47 AM

Yes, our remote control API supports sending any start position you want:

https://github.com/M.../Remote-control



#84 BillOatman OFFLINE  

BillOatman

    Advanced Member

  • Members
  • 111 posts
  • Local time: 10:53 PM

Posted 15 March 2019 - 03:38 PM

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?



#85 robrhedrick OFFLINE  

robrhedrick

    Advanced Member

  • Members
  • 105 posts
  • Local time: 09:53 PM
  • LocationKansas

Posted 16 March 2019 - 10:57 PM

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

 

5c8db6550cec7_20190316_214209.jpg

 

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?

 

Attached Files



#86 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 121725 posts
  • Local time: 10:53 PM

Posted 17 March 2019 - 12:02 AM

@ebr can comment on that. Thanks.



#87 robrhedrick OFFLINE  

robrhedrick

    Advanced Member

  • Members
  • 105 posts
  • Local time: 09:53 PM
  • LocationKansas

Posted 17 March 2019 - 03:23 PM

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

 

5c8db6550cec7_20190316_214209.jpg

 

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?



#88 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 121725 posts
  • Local time: 10:53 PM

Posted 18 March 2019 - 09:14 AM

If he doesn't see this then I would open a topic in the Android TV section. Thanks.

#89 robrhedrick OFFLINE  

robrhedrick

    Advanced Member

  • Members
  • 105 posts
  • Local time: 09:53 PM
  • LocationKansas

Posted 18 March 2019 - 09:49 AM

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/M.../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 by robrhedrick, 18 March 2019 - 09:50 AM.


#90 robrhedrick OFFLINE  

robrhedrick

    Advanced Member

  • Members
  • 105 posts
  • Local time: 09:53 PM
  • LocationKansas

Posted 18 March 2019 - 11:23 AM

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. 

 

5c8db6550cec7_20190316_214209.jpg

 

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?



#91 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 121725 posts
  • Local time: 10:53 PM

Posted 18 March 2019 - 01:58 PM

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

  • robrhedrick likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users