Class
caplin.streamlink.alerts

NotificationListener

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 + ")");
        }
});

Constructor Summary

Attributes Name and Description
caplin.streamlink.alerts.NotificationListener()

Method Summary

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.

Constructor Detail

caplin.streamlink.alerts.NotificationListener()

Method Detail

void onNotification(caplin.streamlink.alerts.Notification notification)

Received when notification gets added to the container.

Parameters
caplin.streamlink.alerts.Notification notification caplin.streamlink.alerts.Notification

void onNotificationRemoved(caplin.streamlink.alerts.Notification notification)

Received when notification is removed from the container.

Parameters
caplin.streamlink.alerts.Notification notification caplin.streamlink.alerts.Notification

void onServiceStatus(caplin.streamlink.ServiceStatus status)

Received when the notification service availability changes.

Parameters
caplin.streamlink.ServiceStatus status the updated caplin.streamlink.ServiceStatus.