More > JRiver Media Center 31 for Linux
MCWS/v1/Playback/Info has no "Status" value
avid:
I don't know if this is a Linux-specific issue. But if start playing a video file then MCWS/v1/Playback/Info does not return a "Status" value:
--- Code: ---<Response Status="OK">
<Item Name="ZoneID">0</Item>
<Item Name="State">2</Item>
<Item Name="FileKey">254876</Item>
<Item Name="NextFileKey">-1</Item>
<Item Name="PositionMS">1358500</Item>
<Item Name="DurationMS">6600240</Item>
<Item Name="ElapsedTimeDisplay">22:38</Item>
<Item Name="RemainingTimeDisplay">-1:27:22</Item>
<Item Name="TotalTimeDisplay">1:50:00</Item>
<Item Name="PositionDisplay">22:38 / 1:50:00</Item>
<Item Name="PlayingNowPosition">0</Item>
<Item Name="PlayingNowTracks">1</Item>
<Item Name="PlayingNowPositionDisplay">1 of 1</Item>
<Item Name="PlayingNowChangeCounter">38</Item>
<Item Name="Bitrate">0</Item>
<Item Name="Bitdepth">0</Item>
<Item Name="SampleRate">0</Item>
<Item Name="Channels">0</Item>
<Item Name="Chapter">0</Item>
<Item Name="Volume">1</Item>
<Item Name="VolumeDisplay">100% (+0.0 dB)</Item>
<Item Name="ImageURL">MCWS/v1/File/GetImage?File=254876</Item>
<Item Name="Name">Channel 4 HD New Lyra</Item>
</Response>
--- End code ---
But if I subsquently pause and resume playback, then the field appears:
--- Code: ---<Item Name="Status">Paused</Item>
--- End code ---
I am monitoring this field, partly for display on a remote UI page, but also to track a period of extended inactivity to allow the screen and audio path to be turned off.
I guess I should check the "State" field instead, but this is indicative of a bug IMHO.
Matt:
We're clearing the status for video playback. I'm investigating more.
mattkhan:
I encountered this when writing my integration with displaycal for video calibration via jrvr
https://github.com/3ll3d00d/displaycal-py3/blob/mcws-untethered/DisplayCAL/mcws.py#L88C9-L88C9
The code to handle it is shown in the link above, it was really messy
Hendrik:
The Status field is not meant to be a replacement for State, but rather offer further details if desired. State is a numeric field and indicates the actual major state of the player. Status contains localized free text, with no guaranteed consistency between playback types - and it being localized makes it practically unusable for scripting anyway, unless you just want to show it to the user.
For clarity, these are the State values:
--- Code: ---enum EPlayerStates
{
PlayerState_Stop = 0,
PlayerState_Pause = 1,
PlayerState_Play = 2,
PlayerState_Wait = 3, (eg. opening)
};
--- End code ---
avid:
--- Quote from: Hendrik on September 13, 2023, 04:23:43 pm ---The Status field is not meant to be a replacement for State, but rather offer further details if desired. State is a numeric field and indicates the actual major state of the player. Status contains localized free text, with no guaranteed consistency between playback types - and it being localized makes it practically unusable for scripting anyway, unless you just want to show it to the user.
--- End quote ---
Thanks for the explanation. I shall switch to using "State" for activity monitoring and use "Status" for display only.
Navigation
[0] Message Index
[#] Next page
Go to full version