SignalVideo reply.

This commit is contained in:
Miroslav Šedivý 2021-02-07 17:29:40 +01:00
parent dd2ca03955
commit 626164df89
2 changed files with 12 additions and 3 deletions

View File

@ -60,8 +60,8 @@ type SignalAnswer struct {
} }
type SignalVideo struct { type SignalVideo struct {
Event string `json:"event,omitempty"` Event string `json:"event,omitempty"`
VideoID string `json:"video_id"` Video string `json:"video"`
} }
///////////////////////////// /////////////////////////////

View File

@ -57,5 +57,14 @@ func (h *MessageHandlerCtx) signalVideo(session types.Session, payload *message.
return nil return nil
} }
return peer.SetVideoID(payload.VideoID) err := peer.SetVideoID(payload.Video)
if err != nil {
return err
}
return session.Send(
message.SignalVideo{
Event: event.SIGNAL_VIDEO,
Video: payload.Video,
})
} }