-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stream and recording start/stop event notification #338
Comments
I think the functionality you are looking for is in the ChannelManager class. You need to bind separately to the |
Is there a separate event for “record-start” and “record-end” to distinguish between streaming and recording (or both)?
From: SML_MeSo ***@***.***>
Sent: Monday, February 21, 2022 8:48 AM
To: SplitmediaLabsLimited/xjs ***@***.***>
Cc: WolfeComputerServices ***@***.***>; Author ***@***.***>
Subject: Re: [SplitmediaLabsLimited/xjs] Stream and recording start/stop event notification (Issue #338)
I think the functionality you are looking for is in the ChannelManager class <https://xjsframework.github.io/api.html#/core/ChannelManager> . You need to bind separately to the stream-start and stream-end events, but both of them should return a StreamInfo object which contains the channel name and other stats.
—
Reply to this email directly, view it on GitHub <#338 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AWUKOZTK3XCF7OY2W5O3WZTU4I7B7ANCNFSM5O4LXISA> .
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub> .
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I'm afraid we don't have separate events for streaming and recording. You can, however, check in the event itself which channel (stream) or recording triggered the event, as shown below:
The commented lines are the previous codes used to check for local recording. But this is now insufficient since this only shows the local recording for the active scene. Recent changes to XBC allowed recording of non-active scenes, which use a different channel name, but with still the same service name. |
Perfect! Thank you!
From: SML_MeSo ***@***.***>
Sent: Wednesday, February 23, 2022 4:32 AM
To: SplitmediaLabsLimited/xjs ***@***.***>
Cc: WolfeComputerServices ***@***.***>; Author ***@***.***>
Subject: Re: [SplitmediaLabsLimited/xjs] Stream and recording start/stop event notification (Issue #338)
I'm afraid we don't have separate events for streaming and recording. You can, however, check in the event itself which channel (stream) or recording triggered the event, as shown below:
xjs.ChannelManager.on('stream-start', function(res) {
if (!res.error) { // No error
const { channel } = res; // StreamInfo Object
// const name = channel.getName();
// if (name === 'Local Recording') {
if (channel._channel.serviceName === 'LocalRecording') {
console.log('LOCAL RECORDING STARTED!!!')
} else {
console.log('STREAM STARTED!!!')
}
}
});
The commented lines are the previous codes used to check for local recording. But this is now insufficient since this only shows the local recording for the active scene. Recent changes to XBC allowed recording of non-active scenes, which use a different channel name.
—
Reply to this email directly, view it on GitHub <#338 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AWUKOZXSREY4PHAI5S5VDSLU4SSRJANCNFSM5O4LXISA> .
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub> .
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Is there a way for a plugin (or other method) to be notified (for the purpose of causing an outside action) to "notified" when a stream starts and stops and when a recording starts and stops?
The text was updated successfully, but these errors were encountered: