mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Hook beofore publish event
This commit is contained in:
parent
d5e1116eb7
commit
ecc5f73c54
2 changed files with 8 additions and 0 deletions
|
@ -3126,6 +3126,12 @@ srs_error_t SrsRtcConnection::create_publisher(SrsRequest* req, SrsRtcStreamDesc
|
|||
}
|
||||
}
|
||||
|
||||
if (_srs_rtc_hijacker) {
|
||||
if ((err = _srs_rtc_hijacker->on_before_publish(this, publisher, req)) != srs_success) {
|
||||
return srs_error_wrap(err, "on before publish");
|
||||
}
|
||||
}
|
||||
|
||||
// If DLTS done, start the publisher. Because maybe create some publishers after DTLS done.
|
||||
if(ESTABLISHED == state()) {
|
||||
if(srs_success != (err = publisher->start())) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue