Class: WaitReadyIndicatorImpl

WaitReadyIndicatorImpl

mmir.env.media.WaitReadyIndicatorImpl

Default / standard implementation for wait-/ready-indication: media-modules may signal that they are preparing a resource, and then that they are ready via the mmir.MediaManager#_preparing and mmir.MediaManager#_ready. This implementation provides a simple mechanism for showing these states to the user: upon preparing an overlay with a "please wait" message is shown, and upon ready the overlay is hidden again. See setWaitCaption for details on setting a custom text message. In order to load this implementation, add the entry "waitReadyIndicator" to the mediaManager.plugins list in the MMIR configuration file at config/configuration.json:
...
  "mediaManager": {
   "plugins": {
     "browser": ["waitReadyIndicator",
                 // OR: {"mod": "waitReadyIndicator", "config": "url to css styles"},
                 "webAudio",
                 ...
     ],
     "cordova": ["waitReadyIndicator",
                 // OR: {"mod": "waitReadyIndicator", "config": "url to css styles"},
                 "androidAudioInput",
                 ...
     ]
     ...
   }
 },
 ...
NOTE: the optional configuration value specifies an URL to a CSS file for styling the wait-/ready-indication dialog. If not specified, the default styling of stlne-wait-dlg is used.
Example
//starting to prepare a resource:
mmir.MediaManager._preparing();

// do something ...

//... when the resouce has been prepared
// and is ready to be used:
mmir.MediaManager._ready();

Requires

  • module:mmirf/waitDialog

Members

_id

readonly_pluginName

Default Value:
  • "waitReadyIndicator"

Methods

staticmmir.env.media.WaitReadyIndicatorImpl.initialize()

Get current caption for wait dialog. NOTE if none is set, then internally the value of "loadingText" property of the current language dictionary will be used.
See:
Shows wait dialog.
See:
Hides wait dialog.
See:
Set caption for wait dialog.

By default (i.e. not set), the dictionary entry for "loadingText" is used as caption / label.

Name Type Description
text String set the caption / label for the wait-dialog.
If undefined, the default caption will be used.
See: