From a97c420d0c3780b1a3914ce60f80c49561e9f1ab Mon Sep 17 00:00:00 2001 From: knowmost Date: Sun, 28 Apr 2024 11:13:23 +0800 Subject: [PATCH] Fix typos in multiple comments --- api_js.go | 2 +- datachannel.go | 2 +- datachannel_js.go | 2 +- examples/insertable-streams/README.md | 2 +- interceptor.go | 2 +- internal/util/util.go | 4 ++-- peerconnection.go | 2 +- peerconnection_media_test.go | 2 +- sdp.go | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api_js.go b/api_js.go index fe94bff1fb..1f0fcb74c2 100644 --- a/api_js.go +++ b/api_js.go @@ -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 } diff --git a/datachannel.go b/datachannel.go index b3dfdad4e1..e975a04f7b 100644 --- a/datachannel.go +++ b/datachannel.go @@ -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{} diff --git a/datachannel_js.go b/datachannel_js.go index a6d1ae5e8a..5e5fc4b0cd 100644 --- a/datachannel_js.go +++ b/datachannel_js.go @@ -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) { diff --git a/examples/insertable-streams/README.md b/examples/insertable-streams/README.md index 73a77bc976..09d23d3b92 100644 --- a/examples/insertable-streams/README.md +++ b/examples/insertable-streams/README.md @@ -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 diff --git a/interceptor.go b/interceptor.go index fec45ab7e0..3ec09f7ac4 100644 --- a/interceptor.go +++ b/interceptor.go @@ -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 diff --git a/internal/util/util.go b/internal/util/util.go index 3f43c123e5..966a6230a6 100644 --- a/internal/util/util.go +++ b/internal/util/util.go @@ -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() } diff --git a/peerconnection.go b/peerconnection.go index 5e2fba24cf..6948905886 100644 --- a/peerconnection.go +++ b/peerconnection.go @@ -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) diff --git a/peerconnection_media_test.go b/peerconnection_media_test.go index c196818a2e..43bdd7ed42 100644 --- a/peerconnection_media_test.go +++ b/peerconnection_media_test.go @@ -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) diff --git a/sdp.go b/sdp.go index 980f985077..7ab0fd8980 100644 --- a/sdp.go +++ b/sdp.go @@ -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 := ""