Fix typos in multiple comments

This commit is contained in:
knowmost
2024-04-28 11:13:23 +08:00
committed by Sean DuBois
parent 83cfeea397
commit a97c420d0c
9 changed files with 10 additions and 10 deletions

View File

@@ -6,7 +6,7 @@
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 {
settingEngine *SettingEngine
}

View File

@@ -236,7 +236,7 @@ func (d *DataChannel) onOpen() {
}
// 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()) {
d.mu.Lock()
d.dialHandlerOnce = sync.Once{}

View File

@@ -115,7 +115,7 @@ func (d *DataChannel) SendText(s string) (err error) {
// Before calling Detach you have to enable this behavior by calling
// webrtc.DetachDataChannels(). Combining detached and normal data channels
// 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
// resulting DataChannel object.
func (d *DataChannel) Detach() (datachannel.ReadWriteCloser, error) {

View File

@@ -4,7 +4,7 @@ This example modifies the video with a single-byte XOR cipher before sending, an
decrypts in Javascript.
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
### Create IVF named `output.ivf` that contains a VP8 track

View File

@@ -127,7 +127,7 @@ func ConfigureCongestionControlFeedback(mediaEngine *MediaEngine, interceptorReg
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 {
if err := mediaEngine.RegisterHeaderExtension(RTPHeaderExtensionCapability{URI: sdp.SDESMidURI}, RTPCodecTypeVideo); err != nil {
return err

View File

@@ -18,12 +18,12 @@ const (
// Use global random generator to properly seed by crypto grade random.
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 {
return globalMathRandomGenerator.GenerateString(n, runesAlpha)
}
// RandUint32 generates a mathmatical random uint32.
// RandUint32 generates a mathematical random uint32.
func RandUint32() uint32 {
return globalMathRandomGenerator.Uint32()
}

View File

@@ -1326,7 +1326,7 @@ func runIfNewReceiver(
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
incomingTracks := trackDetailsFromSDP(pc.log, remoteDesc.parsed)

View File

@@ -1606,7 +1606,7 @@ func TestPeerConnection_Simulcast_RTX(t *testing.T) {
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
// know the SSRC ahead of time
// * Undeclared SSRC in a single media section (https://github.com/pion/webrtc/issues/880)

2
sdp.go
View File

@@ -85,7 +85,7 @@ func trackDetailsFromSDP(log logging.LeveledLogger, s *sdp.SessionDescription) (
tracksInMediaSection := []trackDetails{}
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 := ""
trackID := ""