Tashy497 1 Posted September 13, 2020 Share Posted September 13, 2020 I am able to stream music to Volumio using the emby web interface but how would I do this using the REST API? I can the see the url used in the emby log but I wouldn't have a PlaySessionId or a MediaSourceId. Below is from the log. HTTP GET http://192.168.x.x:8096/audio/3862/stream.wma?DeviceId=uuid:04255cb4-11f0-58db-0053-b827eb2458a8&MediaSourceId=eb7810ffae81a7aef2221d1ae6d94547&Static=true My goal is to create my own web interface to stream music similar to the emby one. I want to use the rest API so I can have my home automation system be able to start, stop. and pause playback. When I try to use the above URL in Chrome I get a download popup. Postman just returns a 200 Ok with no content. Any advice would be greatly appreciated. Thanks. Link to comment Share on other sites More sharing options...
Luke 37062 Posted September 14, 2020 Share Posted September 14, 2020 Hi there, have you explored our api wiki? https://github.com/MediaBrowser/Emby/wiki Link to comment Share on other sites More sharing options...
Tashy497 1 Posted September 14, 2020 Author Share Posted September 14, 2020 I did but no matter what I do, I still get a download popup asking me to download a ".wma" file or I get a "Unable to find specified file." message Here's the arguments I used. I assume this can be doing using a "GET" command. http://192.168.x.x:8096/audio/3862/stream.wma - 3862 is the ID of the track I want to play remotely DeviceId=uuid:04255cb4-11f0-58db-0053-b827eb2458a8 - This is the uuid of my Volumio player UserId=61638f6b3990488984d3d713dae58ba8 - This is the generic user I use to play music using the standard web interface api_key=xxxxxxxxxxxxxxxxxxxxxxxx - This is the api key I created for the REST API request. This works as I am able to use other requests to get things like devices, users, items, etc. MaxStreamingBitrate=140000000 PlaySessionId=1234567890 I even added EnableRedirection=true EnableRemoteMedia=true For the base URL I even tried http://192.168.x.x:8096/audio/3862/universal Using GET results in a download popup. A POST results an "Unable to find specified file." message. Thank you for your time. RAy Link to comment Share on other sites More sharing options...
Luke 37062 Posted September 16, 2020 Share Posted September 16, 2020 Have you used the chrome debugger to compare to what the web app is doing? Link to comment Share on other sites More sharing options...
Tashy497 1 Posted September 17, 2020 Author Share Posted September 17, 2020 Well I got it to work. Not sure if it's the right way. I found a session that appears to always exist for Volumio. Using that session ID I was able to play back tracks using Postman using a URL similar to this. http://emby:8096/Sessions/<session ID>/Playing?ItemIds=<track ID>&PlayCommand=PlayNext&StartIndex=0 Other commands like Stop/Pause/UnPause worked using http://emby:8096/Sessions/<Session ID>/Playing/Stop 1 Link to comment Share on other sites More sharing options...
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