mirror of
https://github.com/pion/webrtc.git
synced 2025-09-27 11:32:19 +08:00
Fix typos in multiple comments
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
package webrtc
|
package webrtc
|
||||||
|
|
||||||
// API bundles the global funcions of the WebRTC and ORTC API.
|
// API bundles the global functions of the WebRTC and ORTC API.
|
||||||
type API struct {
|
type API struct {
|
||||||
settingEngine *SettingEngine
|
settingEngine *SettingEngine
|
||||||
}
|
}
|
||||||
|
@@ -236,7 +236,7 @@ func (d *DataChannel) onOpen() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// OnDial sets an event handler which is invoked when the
|
// OnDial sets an event handler which is invoked when the
|
||||||
// peer has been dialed, but before said peer has responsed
|
// peer has been dialed, but before said peer has responded
|
||||||
func (d *DataChannel) OnDial(f func()) {
|
func (d *DataChannel) OnDial(f func()) {
|
||||||
d.mu.Lock()
|
d.mu.Lock()
|
||||||
d.dialHandlerOnce = sync.Once{}
|
d.dialHandlerOnce = sync.Once{}
|
||||||
|
@@ -115,7 +115,7 @@ func (d *DataChannel) SendText(s string) (err error) {
|
|||||||
// Before calling Detach you have to enable this behavior by calling
|
// Before calling Detach you have to enable this behavior by calling
|
||||||
// webrtc.DetachDataChannels(). Combining detached and normal data channels
|
// webrtc.DetachDataChannels(). Combining detached and normal data channels
|
||||||
// is not supported.
|
// is not supported.
|
||||||
// Please reffer to the data-channels-detach example and the
|
// Please refer to the data-channels-detach example and the
|
||||||
// pion/datachannel documentation for the correct way to handle the
|
// pion/datachannel documentation for the correct way to handle the
|
||||||
// resulting DataChannel object.
|
// resulting DataChannel object.
|
||||||
func (d *DataChannel) Detach() (datachannel.ReadWriteCloser, error) {
|
func (d *DataChannel) Detach() (datachannel.ReadWriteCloser, error) {
|
||||||
|
@@ -4,7 +4,7 @@ This example modifies the video with a single-byte XOR cipher before sending, an
|
|||||||
decrypts in Javascript.
|
decrypts in Javascript.
|
||||||
|
|
||||||
insertable-streams allows the browser to process encoded video. You could implement
|
insertable-streams allows the browser to process encoded video. You could implement
|
||||||
E2E encyption, add metadata or insert a completely different video feed!
|
E2E encryption, add metadata or insert a completely different video feed!
|
||||||
|
|
||||||
## Instructions
|
## Instructions
|
||||||
### Create IVF named `output.ivf` that contains a VP8 track
|
### Create IVF named `output.ivf` that contains a VP8 track
|
||||||
|
@@ -127,7 +127,7 @@ func ConfigureCongestionControlFeedback(mediaEngine *MediaEngine, interceptorReg
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ConfigureSimulcastExtensionHeaders enables the RTP Extenison Headers needed for Simulcast
|
// ConfigureSimulcastExtensionHeaders enables the RTP Extension Headers needed for Simulcast
|
||||||
func ConfigureSimulcastExtensionHeaders(mediaEngine *MediaEngine) error {
|
func ConfigureSimulcastExtensionHeaders(mediaEngine *MediaEngine) error {
|
||||||
if err := mediaEngine.RegisterHeaderExtension(RTPHeaderExtensionCapability{URI: sdp.SDESMidURI}, RTPCodecTypeVideo); err != nil {
|
if err := mediaEngine.RegisterHeaderExtension(RTPHeaderExtensionCapability{URI: sdp.SDESMidURI}, RTPCodecTypeVideo); err != nil {
|
||||||
return err
|
return err
|
||||||
|
@@ -18,12 +18,12 @@ const (
|
|||||||
// Use global random generator to properly seed by crypto grade random.
|
// Use global random generator to properly seed by crypto grade random.
|
||||||
var globalMathRandomGenerator = randutil.NewMathRandomGenerator() // nolint:gochecknoglobals
|
var globalMathRandomGenerator = randutil.NewMathRandomGenerator() // nolint:gochecknoglobals
|
||||||
|
|
||||||
// MathRandAlpha generates a mathmatical random alphabet sequence of the requested length.
|
// MathRandAlpha generates a mathematical random alphabet sequence of the requested length.
|
||||||
func MathRandAlpha(n int) string {
|
func MathRandAlpha(n int) string {
|
||||||
return globalMathRandomGenerator.GenerateString(n, runesAlpha)
|
return globalMathRandomGenerator.GenerateString(n, runesAlpha)
|
||||||
}
|
}
|
||||||
|
|
||||||
// RandUint32 generates a mathmatical random uint32.
|
// RandUint32 generates a mathematical random uint32.
|
||||||
func RandUint32() uint32 {
|
func RandUint32() uint32 {
|
||||||
return globalMathRandomGenerator.Uint32()
|
return globalMathRandomGenerator.Uint32()
|
||||||
}
|
}
|
||||||
|
@@ -1326,7 +1326,7 @@ func runIfNewReceiver(
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// configurepRTPReceivers opens knows inbound SRTP streams from the RemoteDescription
|
// configureRTPReceivers opens knows inbound SRTP streams from the RemoteDescription
|
||||||
func (pc *PeerConnection) configureRTPReceivers(isRenegotiation bool, remoteDesc *SessionDescription, currentTransceivers []*RTPTransceiver) { //nolint:gocognit
|
func (pc *PeerConnection) configureRTPReceivers(isRenegotiation bool, remoteDesc *SessionDescription, currentTransceivers []*RTPTransceiver) { //nolint:gocognit
|
||||||
incomingTracks := trackDetailsFromSDP(pc.log, remoteDesc.parsed)
|
incomingTracks := trackDetailsFromSDP(pc.log, remoteDesc.parsed)
|
||||||
|
|
||||||
|
@@ -1606,7 +1606,7 @@ func TestPeerConnection_Simulcast_RTX(t *testing.T) {
|
|||||||
assert.Greater(t, rtxPacketRead.Load(), int32(0), "no rtx packet read")
|
assert.Greater(t, rtxPacketRead.Load(), int32(0), "no rtx packet read")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Everytime we receieve a new SSRC we probe it and try to determine the proper way to handle it.
|
// Everytime we receive a new SSRC we probe it and try to determine the proper way to handle it.
|
||||||
// In most cases a Track explicitly declares a SSRC and a OnTrack is fired. In two cases we don't
|
// In most cases a Track explicitly declares a SSRC and a OnTrack is fired. In two cases we don't
|
||||||
// know the SSRC ahead of time
|
// know the SSRC ahead of time
|
||||||
// * Undeclared SSRC in a single media section (https://github.com/pion/webrtc/issues/880)
|
// * Undeclared SSRC in a single media section (https://github.com/pion/webrtc/issues/880)
|
||||||
|
2
sdp.go
2
sdp.go
@@ -85,7 +85,7 @@ func trackDetailsFromSDP(log logging.LeveledLogger, s *sdp.SessionDescription) (
|
|||||||
tracksInMediaSection := []trackDetails{}
|
tracksInMediaSection := []trackDetails{}
|
||||||
rtxRepairFlows := map[uint64]uint64{}
|
rtxRepairFlows := map[uint64]uint64{}
|
||||||
|
|
||||||
// Plan B can have multiple tracks in a signle media section
|
// Plan B can have multiple tracks in a single media section
|
||||||
streamID := ""
|
streamID := ""
|
||||||
trackID := ""
|
trackID := ""
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user