[ST Edge] mediaTrackControl and mediaPlayback capabilities

Hi,
For virtual audio device, I’m trying to create the following profile

components:
- id: main
  capabilities:
  - id: mediaPlayback
    version: 1
  - id: audioVolume
    version: 1
  - id: audioMute
    version: 1
  - id: mediaTrackControl
    version: 1
  - id: audioTrackData
    version: 1
  - id: mediaPresets
    version: 1

If both mediaPlayback and mediaTrackControl are initialized with supported commands, like this

device:emit_event( st_capabilities.mediaPlayback.supportedPlaybackCommands( {value = { 'play', 'pause', 'stop', 'fastForward', 'rewind'}}) )
device:emit_event( st_capabilities.mediaTrackControl.supportedTrackControlCommands( {value = {'previousTrack', 'nextTrack'} }) )

then fastForward and rewind are not shown.
If mediaTrackControl is not initialized, then previousTrack, nextTrack are not shown, but fastForward and rewind are shown.
Is there a way to show both in the detailed view at the same time?

Thanks

Hi, @ygerlovin.
Thank you for bringing this up, I’ll make some tests on my side to see the behavior of these capabilities. and come back here with the results.

1 Like

I made more tests and I can see all the buttons, could you share how the device UI looks on your side, please?
Also, some things I noticed during my tests were:

  • We need to initialize the attribute of mediaPlayback > playbackStatus. Otherwise something weird happens with its buttons.
device:emit_event( capabilities.mediaPlayback.playbackStatus('playing'))
  • If the supported values/commands are not set correctly, which can be verified by making a query to the device/status, the buttons appeared in grey

Do you receive any error in the logs?

Be aware the fastforward button is broken.

1 Like

Hi @nayelyz ,

Thank you for your help.
For the following profile

name: vAudio (YG)
components:
- id: main
  capabilities:
  - id: mediaPlayback
    version: 1
  - id: mediaTrackControl
    version: 1
  - id: audioTrackData
    version: 1
  categories:
  - name: NetworkAudio
metadata:
  ocfDeviceType: oic.d.networkaudio

I get

However, if I remove audioTrackData capability, I get the same results as you.

@nayelyz ,
I was experimenting with audioTrackData.
It seems that UI would try to put media related capabilities inside audioTrackData view, if it exists in the component.
However, audioTrackData’s view is probably unable to dynamically expand, so whatever does not fit into its view, is just not shown in UI.
I found a way to workaround this by adding ‘track’ component

 name: vAudio (YG)
components:
- id: main
  label: Playback
  capabilities:
  - id: mediaPlayback
    version: 1
  - id: audioVolume
    version: 1
  - id: audioMute
    version: 1
  - id: audioTrackData
    version: 1
  - id: mediaPresets
    version: 1
  - id: refresh
    version: 1
  - id: healthCheck
    version: 1
- id: track
  label: Track Control
  capabilities:
  - id: mediaTrackControl
    version: 1
  - id: audioTrackAddressing
    version: 1
  categories:
  - name: NetworkAudio
metadata:
  ocfDeviceType: oic.d.networkaudio

Sorry for the delay, as these are proposed capabilities, inconsistent behavior is expected from them.
Thank you for sharing the workaround you found, I’ll try to get more feedback from the team.

1 Like