Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Automatically run REST startStreamingOut after publishing a stream #1139

Open
thegobot opened this issue Jan 13, 2022 · 2 comments
Open

Automatically run REST startStreamingOut after publishing a stream #1139

thegobot opened this issue Jan 13, 2022 · 2 comments

Comments

@thegobot
Copy link
Contributor

How can I automatically run REST startStreamingOut after publishing a stream? I want to automatically duplicate the stream to RTMP

How can I capture a "stream add" event?
Through a portal?

How can I intercept these events from my application?


2022-01-13 06:07:58.019  - DEBUG: AmqpClient - remoteCall, corrID: 0 to: [email protected] method: broadcast
2022-01-13 06:07:58.150  - DEBUG: AmqpClient - remoteCall, corrID: 1 to: owt-cluster method: schedule
2022-01-13 06:07:58.151  - DEBUG: AmqpClient - remoteCall, corrID: 2 to: [email protected] method: getNode
2022-01-13 06:07:58.193  - DEBUG: AmqpClient - remoteCall, corrID: 3 to: [email protected]_11 method: publish
2022-01-13 06:07:58.399  - DEBUG: AmqpClient - remoteCall, corrID: 4 to: [email protected]_11 method: onTransportSignaling
2022-01-13 06:07:58.406  - DEBUG: AmqpClient - remoteCall, corrID: 5 to: [email protected] method: notify
2022-01-13 06:07:58.581  - DEBUG: AmqpClient - remoteCall, corrID: 6 to: [email protected]_11 method: onTransportSignaling
2022-01-13 06:07:58.589  - DEBUG: AmqpClient - remoteCall, corrID: 7 to: [email protected]_11 method: onTransportSignaling
2022-01-13 06:07:58.592  - DEBUG: AmqpClient - remoteCall, corrID: 8 to: [email protected]_11 method: onTransportSignaling
2022-01-13 06:07:58.606  - DEBUG: AmqpClient - remoteCall, corrID: 9 to: [email protected]_11 method: onTransportSignaling
2022-01-13 06:07:58.607  - DEBUG: AmqpClient - remoteCall, corrID: 10 to: [email protected]_11 method: onTransportSignaling
2022-01-13 06:07:58.610  - DEBUG: AmqpClient - remoteCall, corrID: 11 to: [email protected]_11 method: onTransportSignaling
2022-01-13 06:07:58.653  - DEBUG: AmqpClient - remoteCall, corrID: 12 to: [email protected]_11 method: onTransportSignaling
2022-01-13 06:07:58.653  - DEBUG: AmqpClient - remoteCall, corrID: 13 to: [email protected]_11 method: onTransportSignaling
2022-01-13 06:07:58.654  - DEBUG: AmqpClient - remoteCall, corrID: 14 to: [email protected]_11 method: onTransportSignaling
2022-01-13 06:07:58.654  - DEBUG: AmqpClient - remoteCall, corrID: 15 to: [email protected]_11 method: onTransportSignaling
2022-01-13 06:07:58.655  - DEBUG: AmqpClient - remoteCall, corrID: 16 to: [email protected]_11 method: onTransportSignaling
2022-01-13 06:07:58.655  - DEBUG: AmqpClient - remoteCall, corrID: 17 to: [email protected]_11 method: onTransportSignaling
2022-01-13 06:07:59.042  - DEBUG: AmqpClient - remoteCall, corrID: 18 to: [email protected] method: notify
2022-01-13 06:07:59.043  - DEBUG: AmqpClient - remoteCall, corrID: 19 to: [email protected] method: notify
2022-01-13 06:07:59.047  - DEBUG: AmqpClient - remoteCall, corrID: 20 to: [email protected]_11 method: getInternalAddress
2022-01-13 06:07:59.048  - DEBUG: AmqpClient - remoteCall, corrID: 21 to: [email protected]_11 method: getInternalAddress
2022-01-13 06:07:59.059  - DEBUG: AmqpClient - remoteCall, corrID: 22 to: [email protected] method: broadcast
2022-01-13 06:07:59.103  - DEBUG: AmqpClient - remoteCall, corrID: 23 to: [email protected] method: broadcast


2022-01-13 06:07:25.431  - DEBUG: AmqpClient - remoteCall, corrID: 24 to: [email protected]_11 method: unpublish
2022-01-13 06:07:25.453  - DEBUG: AmqpClient - remoteCall, corrID: 25 to: [email protected]_11 method: destroyTransport
2022-01-13 06:07:25.460  - DEBUG: AmqpClient - remoteCall, corrID: 26 to: [email protected] method: recycleNode

Which way is the most correct?

@starwarfan
Copy link
Collaborator

You could find stream add events in portal's notify function(https://github.com/open-webrtc-toolkit/owt-server/blob/master/source/portal/index.js#L230). You may modify some code to achieve that.

@thegobot
Copy link
Contributor Author

Connect to the portal? Not a very good way. I disabled notifications for participants in the conference(room), such notifications are not very security (they are public).

I modified the conference so that I receive messages via RCP from it

const sendMsgTo = function(to, msg, data) 
const sendMsg = function(from, to, msg, data) {
   rpcChannel.makeRPC("myApp", msg, [data]);
   ...
}

It's surprising that this feature is not available by default

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants