Skip to content

StreamInfo

Defined in: core/streaminfo.ts:38

The StreamInfo class provides methods to monitor the current active streams activity and other details.

This can be used together with #core/Output Output Class and check the details of the currently live outputs.

var xjs = require('xjs');
xjs.ready()
.then(xjs.StreamInfo.getActiveStreamChannels)
.then(function(channels) {
var stream = []
channels.forEach(function(channel){
channel.getName()
.then(name => {
if(name.includes('Twitch')) {
stream.push(channel)
}
})
})
return stream
}).then(function(stream) {
// Get any stream information you need here
return stream[0].getStreamRenderedFrames()
})

new StreamInfo(props): StreamInfo

Defined in: core/streaminfo.ts:44

StreamInfo constructor (only used internally)

JSON

string

JSON

StreamInfo

getBandwidthUsage(): Promise<number>

Defined in: core/streaminfo.ts:169

return: Promise

Gets the current bandwidth usage of the stream

Promise<number>


getGOPDrops(): Promise<number>

Defined in: core/streaminfo.ts:120

return: Promise

Gets the number of GOP frames dropped

Promise<number>


getName(): Promise<string>

Defined in: core/streaminfo.ts:86

return: Promise

Gets the name of the channel.

Promise<string>


getStreamDrops(): Promise<number>

Defined in: core/streaminfo.ts:104

return: Promise

Gets the number of frames dropped

Promise<number>


getStreamRenderedFrames(): Promise<number>

Defined in: core/streaminfo.ts:139

return: Promise

Gets the number of frames rendered

Promise<number>


getStreamTime(): Promise<number>

Defined in: core/streaminfo.ts:155

return: Promise

Gets the current duration of the stream in microseconds

Promise<number>


static getActiveStreamChannels(): Promise<StreamInfo[]>

Defined in: core/streaminfo.ts:55

return: Promise<StreamInfo[]>

Gets the list of currently active channels.

Promise<StreamInfo[]>