Search code examples
androidupnpdlna

Control buttons on "Golden DMC" are grey when select my DMR


I wrote a DMR for android with the open source project CyberLink4Java. Test it with tools that DLNA group released (Golden DMC & Gloden DMS). I create a Device with proper description file. Now it can push play.

But it don't support control by the DMC.

On the DMC UI, the control buttons(play, pause and stop) are grey.

There must be some data exchange to tell the DMC that it support these controls during the DMR service start. But I can't find in the spec. Any idea on what's wrong?


Solution

  • The way to expose transport-controlling actions that are valid at a given time is the CurrentTransportActions state variable and the corresponding method GetCurrentTransportActions. These features are optional but conditionally required so if you implement one you need to implement both. CurrentTransportActions is like most variables in AVTransport: it's not evented on its own but value changes will be included in LastChange events. This is all documented in AVTransport service definition.

    That said, mostly a DMC can figure out the valid actions based on DMR state even if the above features aren't supported: e.g. if AVTransportURI is empty, showing playback controls doesn't make sense.