Skip to main content
Version: JavaScript SDK v1.1.0

Notifications

VideoKit allows you to subscribe to realtime notifications from the server with video updates. You can do this using the following convenient methods of VideoStore.

New videos

To subscribe to new videos added to the current video.io app.

// Subscribe on all new videos from application
const cancelSubscription = VideoStore.subscribeOnNewVideos({}, video => {
// Handle new video
})

// Cancel subscription
cancelSubscription()

Or you could also subscribe to new videos with some specific tags, metadata or video ids.

VideoStore.subscribeOnNewVideos({
tags: ['cats'],
metadata: {
'breed': 'persian'
}
}, video => {
// Handle new video with specific tags and metadata
})

Video updates

You could also subscribe to all updates of a specific video.

const cancelSubscription = VideoStore.subscribeOnVideoUpdate(videoId, video => {
// Handle video update
})

// Cancel subscription
cancelSubscription()