2016-03-26 00:47:20 +01:00
|
|
|
# tell remote control to
|
|
|
|
|
|
|
|
Control the presentation of media content available on a remote device using the `tell remote control` to function.
|
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
## ~hint
|
2016-03-26 00:47:20 +01:00
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
**App required** You must use one of the [micro:bit apps](https://microbit.org/guide/mobile/) to use this functionality.
|
|
|
|
|
|
|
|
## ~
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
|
2016-06-21 07:06:19 +02:00
|
|
|
```sig
|
2019-12-02 05:58:26 +01:00
|
|
|
devices.tellRemoteControlTo(MesRemoteControlEvent.play)
|
2016-03-26 00:47:20 +01:00
|
|
|
```
|
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
## Parameters
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
* event - an event identifier
|
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
## Event values
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
* play
|
|
|
|
* stop
|
|
|
|
* pause
|
|
|
|
* forward
|
|
|
|
* rewind
|
|
|
|
* volume up
|
|
|
|
* volume down
|
|
|
|
* previous track
|
|
|
|
* next track
|
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
## Examples
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
To tell the connected device to start playing:
|
|
|
|
|
2016-06-21 07:06:19 +02:00
|
|
|
```blocks
|
2019-12-02 05:58:26 +01:00
|
|
|
devices.tellRemoteControlTo(MesRemoteControlEvent.play)
|
2016-03-26 00:47:20 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
To tell the connected device to stop playing
|
|
|
|
|
2016-06-21 07:06:19 +02:00
|
|
|
```blocks
|
2019-12-02 05:58:26 +01:00
|
|
|
devices.tellRemoteControlTo(MesRemoteControlEvent.stop)
|
2016-03-26 00:47:20 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
To tell the connected device to go to next track
|
|
|
|
|
2016-06-21 07:06:19 +02:00
|
|
|
```blocks
|
2019-12-02 05:58:26 +01:00
|
|
|
devices.tellRemoteControlTo(MesRemoteControlEvent.nextTrack)
|
2016-03-26 00:47:20 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
To tell the connected device to go to previous track
|
|
|
|
|
2016-06-21 07:06:19 +02:00
|
|
|
```blocks
|
2019-12-02 05:58:26 +01:00
|
|
|
devices.tellRemoteControlTo(MesRemoteControlEvent.previousTrack)
|
2016-03-26 00:47:20 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
To tell the connected device to go forward
|
|
|
|
|
2016-06-21 07:06:19 +02:00
|
|
|
```blocks
|
2019-12-02 05:58:26 +01:00
|
|
|
devices.tellRemoteControlTo(MesRemoteControlEvent.forward)
|
2016-03-26 00:47:20 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
To tell the connected device to rewind
|
|
|
|
|
2016-06-21 07:06:19 +02:00
|
|
|
```blocks
|
2019-12-02 05:58:26 +01:00
|
|
|
devices.tellRemoteControlTo(MesRemoteControlEvent.rewind)
|
2016-03-26 00:47:20 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
To tell the connected device volume up
|
|
|
|
|
2016-06-21 07:06:19 +02:00
|
|
|
```blocks
|
2019-12-02 05:58:26 +01:00
|
|
|
devices.tellRemoteControlTo(MesRemoteControlEvent.volumeUp)
|
2016-03-26 00:47:20 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
To tell the connected device volume down
|
|
|
|
|
2016-06-21 07:06:19 +02:00
|
|
|
```blocks
|
2019-12-02 05:58:26 +01:00
|
|
|
devices.tellRemoteControlTo(MesRemoteControlEvent.volumeDown)
|
2016-03-26 00:47:20 +01:00
|
|
|
```
|
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
## See also
|
2016-03-26 00:47:20 +01:00
|
|
|
|
2016-06-19 14:28:46 +02:00
|
|
|
[tell camera to](/reference/devices/tell-camera-to), [raise alert to](/reference/devices/raise-alert-to)
|
2016-03-26 00:47:20 +01:00
|
|
|
|
2016-06-21 07:06:19 +02:00
|
|
|
|
|
|
|
```package
|
2016-10-23 06:29:31 +02:00
|
|
|
devices
|
2016-06-21 07:06:19 +02:00
|
|
|
```
|