Yurba Docs
Yurba Documentation

Get started

Accounts

Apps

Users

Relationships

Dialogs (Messages)

Tracks (MuseBase)

Photos

Posts

Comments

Safety

Other

Yurba CDN (cdn.yurba.one)

Yurba Desktop API

Yurba Component Language

OBJECT ModuleControl

Structure

ModuleControl: { ... } Methods structure

ModuleControl { Object MusicPlayer { Method on { eventName: String, func: Function } }, Object Notificator { Method open { content: Object, time: Int, Optional } } } Description

An object that stores other prepared objects, allowing convenient but limited control and modification of modules within the application

MusicPlayer Module

One of the modules that allows you to control the music player built into the application

METHOD on

Allows you to track MusicPlayer events

const mp = ModuleControl.MusicPlayer mp.on("play", () => { ... }) // on play mp.on("pause", () => { ... }) // on pause mp.on("update", () => { ... }) // on update (music change) mp.on("open", () => { ... }) // on open mp.on("close", () => { ... }) // on close Notificator Module

Allows you to manage the "Additional mini-modal notification window" module (Notificator)

METHOD open

Allows you to open Notificator

const notificator = ModuleControl.Notificator notificator.open( { icon: String, image: Path, // if not icon animate: Bool // disable or not any icon/image animations type: String, text: String } ) We have now looked at the option with a "text" type Notificator. However, there is also an option where the type is "status":

const notificator = ModuleControl.Notificator notificator.open( { // ... content: { title: String, description: String, align: String } } )