mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
fx WebRTC logging.
This commit is contained in:
parent
75c1dd6d22
commit
e0f1857c51
@ -153,13 +153,11 @@ func (manager *WebRTCManagerCtx) CreatePeer(session types.Session, videoID strin
|
|||||||
// create video track
|
// create video track
|
||||||
videoStream, ok := manager.capture.Video(videoID)
|
videoStream, ok := manager.capture.Video(videoID)
|
||||||
if !ok {
|
if !ok {
|
||||||
logger.Warn().Str("video_id", videoID).Msg("video stream not found")
|
return nil, types.ErrWebRTCVideoNotFound
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
videoTrack, err := webrtc.NewTrackLocalStaticSample(videoStream.Codec().Capability, "video", "stream")
|
videoTrack, err := webrtc.NewTrackLocalStaticSample(videoStream.Codec().Capability, "video", "stream")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Err(err).Msg("unable to create video track")
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,7 +176,6 @@ func (manager *WebRTCManagerCtx) CreatePeer(session types.Session, videoID strin
|
|||||||
// should be stream started
|
// should be stream started
|
||||||
if videoStream.ListenersCount() == 0 {
|
if videoStream.ListenersCount() == 0 {
|
||||||
if err := videoStream.Start(); err != nil {
|
if err := videoStream.Start(); err != nil {
|
||||||
logger.Err(err).Msg("unable to start video pipeline")
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user