(codec webrtc.RTPCodecCapability, id string, label string, opts ...AddTrackOption)
| 964 | } |
| 965 | |
| 966 | func (c *RTCClient) AddStaticTrackWithCodec(codec webrtc.RTPCodecCapability, id string, label string, opts ...AddTrackOption) (writer TrackWriter, err error) { |
| 967 | track, err := webrtc.NewTrackLocalStaticSample(codec, id, label) |
| 968 | if err != nil { |
| 969 | return |
| 970 | } |
| 971 | |
| 972 | return c.AddTrack(track, "", opts...) |
| 973 | } |
| 974 | |
| 975 | func (c *RTCClient) AddFileTrack(path string, id string, label string) (writer TrackWriter, err error) { |
| 976 | // determine file mime |