new 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