Interface that should be implemented to receive notification change callbacks from the NotificationProvider
A trivial implementation of NotificationListener
would be:
// A caplin.streamlink.alerts.NotificationListener that can handle
// every possible callback.
//
// This trivial implementation just logs the callbacks
//
var notificationService = new caplin.streamlink.alerts.NotificationService(streamlink);
notificationService.addListener(
{
onNotification: function(notification)
{
console.log("onNotification()(" + notification.toString() + ")");
},
onNotificationRemoved: function(notification)
{
console.log("onNotificationRemoved(" + notification.toString() + ")");
},
onServiceStatus: function(status)
{
console.log("onServiceStatus(" + status + ")");
}
});
Attributes | Name and Description |
---|---|
|
caplin.streamlink.alerts.NotificationListener()
|
Attributes | Name and Description |
---|---|
|
void
onNotification(caplin.streamlink.alerts.Notification notification)
Received when notification gets added to the container. |
|
void
onNotificationRemoved(caplin.streamlink.alerts.Notification notification)
Received when notification is removed from the container. |
|
void
onServiceStatus(caplin.streamlink.ServiceStatus status)
Received when the notification service availability changes. |
►
caplin.streamlink.alerts.NotificationListener()
►
void
onNotification(caplin.streamlink.alerts.Notification notification)
Received when notification gets added to the container.
caplin.streamlink.alerts.Notification | notification | caplin.streamlink.alerts.Notification |
►
void
onNotificationRemoved(caplin.streamlink.alerts.Notification notification)
Received when notification is removed from the container.
caplin.streamlink.alerts.Notification | notification | caplin.streamlink.alerts.Notification |
►
void
onServiceStatus(caplin.streamlink.ServiceStatus status)
Received when the notification service availability changes.
caplin.streamlink.ServiceStatus | status | the updated caplin.streamlink.ServiceStatus. |