INTERACT FORUM

Please login or register.

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

Author Topic: MediaCenter Playback States  (Read 1785 times)

Striker

  • World Citizen
  • ***
  • Posts: 176
MediaCenter Playback States
« on: March 03, 2024, 04:21:32 pm »

I'm trying to figure out what the valid playback states are for MediaCenter as returned by:

http://localhost:52199/MCWS/v1/Playback/Info?Zone=-1     in the "State" field

I have searched and looked at MCCommands.h but I can't seem to find the full list of available states.

This is what I've found so far... I've seen WAITING ("Status" field) too but didn't write down the numeric value.

STOP = 0,
PAUSED = 1,
PLAYING = 2,
BUFFERING = 3
WAITING = ??
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4225
Re: MediaCenter Playback States
« Reply #1 on: March 03, 2024, 04:28:42 pm »

Logged

Striker

  • World Citizen
  • ***
  • Posts: 176
Re: MediaCenter Playback States
« Reply #2 on: March 03, 2024, 04:33:44 pm »

https://github.com/3ll3d00d/hamcws/blob/main/hamcws/hamcws.py#L155

3 is the magic number

I see state 3 as status "Buffering"

I've seen status "WAITING" but I didn't record the State value.

Quote
<Response Status="OK">
<Item Name="ZoneID">0</Item>
<Item Name="State">3</Item>
<Item Name="FileKey">48316864</Item>
<Item Name="NextFileKey">48316870</Item>
<Item Name="PositionMS">0</Item>
<Item Name="DurationMS">232320</Item>
<Item Name="ElapsedTimeDisplay">0:00</Item>
<Item Name="RemainingTimeDisplay">-3:52</Item>
<Item Name="TotalTimeDisplay">3:52</Item>
<Item Name="PositionDisplay">0:00 / 3:52</Item>
<Item Name="PlayingNowPosition">2</Item>
<Item Name="PlayingNowTracks">1383</Item>
<Item Name="PlayingNowPositionDisplay">3 of 1383</Item>
<Item Name="PlayingNowChangeCounter">97</Item>
<Item Name="Bitrate">0</Item>
<Item Name="Bitdepth">16</Item>
<Item Name="SampleRate">44100</Item>
<Item Name="Channels">2</Item>
<Item Name="Chapter">0</Item>
<Item Name="Volume">-1</Item>
<Item Name="VolumeDisplay">N/A</Item>
<Item Name="ImageURL">MCWS/v1/File/GetImage?File=48316864</Item>
<Item Name="Artist">Slackjaw Blues Band</Item>
<Item Name="Album">2012 Slackjaw</Item>
<Item Name="Name">When I Did Nothing Wrong</Item>
<Item Name="Status">Buffering...</Item>
</Response>
Logged

MrBiff

  • World Citizen
  • ***
  • Posts: 151
Re: MediaCenter Playback States
« Reply #3 on: March 03, 2024, 05:01:21 pm »

Ignore the Status attribute... it won't exist for video.

Here are the state values I have:

Code: [Select]
        0 => 'Stopped',
        1 => 'Paused',
        2 => 'Playing',
        3 => 'Waiting',
        4 => 'Count',
Logged

Striker

  • World Citizen
  • ***
  • Posts: 176
Re: MediaCenter Playback States
« Reply #4 on: March 03, 2024, 05:28:25 pm »

Ignore the Status attribute... it won't exist for video.

Here are the state values I have:

Code: [Select]
        0 => 'Stopped',
        1 => 'Paused',
        2 => 'Playing',
        3 => 'Waiting',
        4 => 'Count',

Thanks MrBiff and mattkhan....  Maybe "Buffering" and "WAITING" are the same numeric state.  I'm logging all I get to try and get all the states/state values, but WAITING is rare.

I use MC only for audio.
Logged

MrBiff

  • World Citizen
  • ***
  • Posts: 151
Re: MediaCenter Playback States
« Reply #5 on: March 03, 2024, 05:32:28 pm »

Play a URL and you will see the waiting state.
Logged

Striker

  • World Citizen
  • ***
  • Posts: 176
Re: MediaCenter Playback States
« Reply #6 on: March 03, 2024, 05:35:11 pm »

Play a URL and you will see the waiting state.

I'm not sure what "play a url means"....  is that video related to MediaCenter?  I've never played any video in MediaCenter.

If you see the WAITING status... what is the state numeric value?
Logged

MrBiff

  • World Citizen
  • ***
  • Posts: 151
Re: MediaCenter Playback States
« Reply #7 on: March 03, 2024, 05:48:55 pm »

File > Open URL, and paste a URL such as:

https://streams.kqed.org/kqedradio

The "Status" attribute is just a friendly display name used by MC.  Use the State attribute.  The values are as I've posted above.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4225
Re: MediaCenter Playback States
« Reply #8 on: March 04, 2024, 02:20:13 am »

Ignore the Status attribute... it won't exist for video.

Here are the state values I have:

Code: [Select]
        0 => 'Stopped',
        1 => 'Paused',
        2 => 'Playing',
        3 => 'Waiting',
        4 => 'Count',
Never seen count before, what do you need to do in MC to produce that state?
Logged
Pages: [1]   Go Up