Webportal v2

embedded apps

API Reference - media.playerControlsAvailability

Required Privacy: Data & Location
Operations:

This API allows to check the availability of a Media Player function and enable or disable it’s availability.

Input Parameter
No input params
Output Data
Data name Description Type Unit/Values Example
repeat

Inform if the repeat function of the Media Player is available in this context or not.

boolean

n/a

false
shuffle

Inform if the shuffle function of the Media Player is available in this context or not.

boolean

n/a

true
next

Inform if the next function of the Media Player is available in this context or not.

boolean

n/a

true
prev

Inform if the previous function of the Media Player is available in this context or not.

boolean

n/a

false
Code Example
1
2
3
4
5
6
7
8
9
10
11
12
13
webportal.get(
    /* api name */
    "media.playerControlsAvailability",
    /* parameters */
     null
  )
  /* callback for `REPLY` messages */
  .then((message) => {
    if (message.status === 200) {
      /* handle `REPLY` success */
    }
    else { /* handle `REPLY` error */ }
  })
1
2
3
4
5
6
{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0", 
  "type": "GET", 
  "api": "media.playerControlsAvailability",
  "params":  null
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// --- format of the `REPLY` message ---

{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0",
  "type": "REPLY",
  "api": "media.playerControlsAvailability",
  "status": 200,
  "statusText": "OK", 
  "data":  { 
    "repeat": false,
    "shuffle": true,
    "next": true,
    "prev": false
  } 
}

false

This API allows to check the availability of a Media Player function and enable or disable it’s availability.

Input Parameter
Param name Description Type Unit/Values Example Required
repeat

Enable or disable repeat in Media Player.

boolean

n/a

false false
shuffle

Enable or disable shuffle in Media Player.

boolean

n/a

true false
next

Enable or disable next in Media Player.

boolean

n/a

true false
prev

Enable or disable previous in Media Player.

boolean

n/a

false false
Output Data
No outputted data
Code Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
webportal.set(
    /* api name */
    "media.playerControlsAvailability",
    /* parameters */
     { 
      "repeat": false,
      "shuffle": true,
      "next": true,
      "prev": false
        }
  )
  /* callback for `REPLY` messages */
  .then((message) => {
    if (message.status === 200) {
      /* handle `REPLY` success */
    }
    else { /* handle `REPLY` error */ }
  })
1
2
3
4
5
6
7
8
9
10
11
{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0", 
  "type": "SET", 
  "api": "media.playerControlsAvailability",
  "params":  { 
    "repeat": false,
    "shuffle": true,
    "next": true,
    "prev": false
  }
}
1
2
3
4
5
6
7
8
9
// --- format of the `REPLY` message ---

{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0",
  "type": "REPLY",
  "api": "media.playerControlsAvailability",
  "status": 200,
  "statusText": "OK"
}

false