English
English
简体中文
Contact Us
Register
Log In
Language
English
English
简体中文
Contact Us
Log In
Register
Go to main website
App Develop

App Development

Tuya provides multiple mobile app development methods such as no-code or IoT App SDK development to maximize the monetization of IoT apps.
layoutIndex

Lullaby List

Last Updated on : 2021-12-21 07:41:56download

This component applies to IP cameras (IPCs). You must set the lullaby list data point (DP) to enable this component. dpCode: ipc_lullaby_list.

You can use this component to configure the panel of IPC lullaby list products. For example, add enumerations of lullabies in device storage and their multilingual names.

Preview

Light theme

Lullaby List

Dark theme

Lullaby List

API description

uiIdParams: Object

Parameter Type Description Required
uiId string The target uiId. Yes

pageParams: Object

Parameter Type Description Default value Required
extraInfo Object: { themeType: ‘dark’ or ‘light’ } The additional information. {} No

Example

// To navigate from the video preview page to the lullaby list component, the system must listen for requests to return from the lullaby list component to the video preview page and restart streaming.

// Navigates to the lullaby list component.
TYSdk.mobile.jumpSubPage(
  { uiId: '000000xe2s' },
  {
    extraInfo: {
      // `light` indicates the light theme and `dark` indicates the dark theme. Default value: `light`.
      themeType: 'light' or 'dark'
    }
  }
);

// Listens for requests to return from the lullaby list component to the video preview page.
TYSdk.mobile.uiIdNavEventEmitter(
   msg => {
        if(msg && msg.type === 'backToLivePreview') {
             console.log('Restart streaming')
        }
   }
);

Multilingual fields

sub_ipc_lullaby_music_list: 'Lullaby list',
sub_ipc_lullaby_song_0: 'song0 - charles',
sub_ipc_lullaby_song_1: 'song1 - charles',
sub_ipc_lullaby_song_2: 'song2 - charles',
sub_ipc_lullaby_song_3: 'song3 - charles',
sub_ipc_lullaby_song_4: 'song4 - charles',
sub_ipc_lullaby_song_5: 'song5 - charles',