Music Player

I'm developing a driver for JRiver Media Center. When I put my device on on a dashboard, I get the previous and next buttons, mute/unmute, volume slider, and track information. What I don't get is a play/pause button. How do I get that to show up?

Thanks.

1 Like

I think in most cases what you see is what you get on the dashboard templates. When I use the Music Player template for my Sonos speaker I see the play / pause icon alternate depending on what I am doing, showing a pause icon when I am playing a track and a play button when nothing is playing. Do you not see this with your device / tile?
EDIT: Actually, you quite clearly answered that in your question.... There must be a capability your are missing.... Apart from the MusicPlayer capability, the only other one that seems likely is MediaTransport.

image

image

Per @sburke781 , here are the commands available for a sonos speaker, hope that is helpful:

1 Like

I vaguely remember running into this same thing.

Are you issuing a sendEvent for the status attribute of MusicPlayer? Here's a snippet of my code that handles that (to illustrate statuses that seemed important):

    def tempStatus = ""
    switch(resp_json.status.toString())
    {
        case "stop":
            tempStatus = "stopped"
            break
        case "play":
            tempStatus = "playing"
            break
        case "load":
            tempStatus = "loading"
            break
        case "pause":
            tempStatus = "paused"
            break
    }        
    sendEvent(name: "status", value: tempStatus)
1 Like

Found the issue. I was using "state" instead of "status". Making that changed fixed the issue.

Thanks all for the suggestions.

3 Likes