INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MCWS/v1/Playback/Info has no "Status" value  (Read 882 times)

avid

  • Regular Member
  • World Citizen
  • ***
  • Posts: 180
  • MC user since 2003
MCWS/v1/Playback/Info has no "Status" value
« on: September 13, 2023, 02:05:22 pm »

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: [Select]
<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>

But if I subsquently pause and resume playback, then the field appears:
Code: [Select]
<Item Name="Status">Paused</Item>

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.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42388
  • Shoes gone again!
Re: MCWS/v1/Playback/Info has no "Status" value
« Reply #1 on: September 13, 2023, 02:37:48 pm »

We're clearing the status for video playback.  I'm investigating more.
Logged
Matt Ashland, JRiver Media Center

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: MCWS/v1/Playback/Info has no "Status" value
« Reply #2 on: September 13, 2023, 03:43:10 pm »

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
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10944
Re: MCWS/v1/Playback/Info has no "Status" value
« Reply #3 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.

For clarity, these are the State values:

Code: [Select]
enum EPlayerStates
{
PlayerState_Stop = 0,
PlayerState_Pause = 1,
PlayerState_Play = 2,
PlayerState_Wait = 3, (eg. opening)
};
Logged
~ nevcairiel
~ Author of LAV Filters

avid

  • Regular Member
  • World Citizen
  • ***
  • Posts: 180
  • MC user since 2003
Re: MCWS/v1/Playback/Info has no "Status" value
« Reply #4 on: September 14, 2023, 12:29:12 am »

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.

Thanks for the explanation. I shall switch to using "State" for activity monitoring and use "Status" for display only.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: MCWS/v1/Playback/Info has no "Status" value
« Reply #5 on: September 14, 2023, 11:02:42 am »

I don't think those status values are sufficient to capture what the UI is actually doing, they are narrower in scope basically. If you need to know what what you are playing is actually on screen then, as far as I could work out, you need to parse text field
Logged

avid

  • Regular Member
  • World Citizen
  • ***
  • Posts: 180
  • MC user since 2003
Re: MCWS/v1/Playback/Info has no "Status" value
« Reply #6 on: September 14, 2023, 11:27:54 am »

Thanks, but it is sufficient for me. I do read and use other fields (position, name etc) but for the state, I either use it to display on the remote (in this case I use Status). This is particularly relevant for Television. Or else I need to determine if the player has been paused and forgotten about. In that later case, I can use State==2 to indicate activity and after (say) 15 minutes of inactivity, I can start turning off the screen and AVR.
Logged
Pages: [1]   Go Up