{"record":{"id":"cac04d38310bcf1a","repo":"router-for-me/CLIProxyAPI","slug":"register-opus-codec-w","errorCode":null,"errorMessage":"register Opus codec: %w","messagePattern":"register Opus codec: %w","errorType":"http","errorClass":null,"httpStatus":503,"severity":"error","filePath":"internal/client/codex/live/media.go","lineNumber":216,"sourceCode":"\t}\n\tl.mu.Unlock()\n}\n\nfunc newPionAPI(relayConfig config.CodexLiveMediaRelayConfig, filterPrivateRemoteIPs bool) (*webrtc.API, error) {\n\treturn newPionAPIWithOptions(relayConfig, filterPrivateRemoteIPs, false)\n}\n\nfunc newPionProxyAPI(relayConfig config.CodexLiveMediaRelayConfig) (*webrtc.API, error) {\n\treturn newPionAPIWithOptions(relayConfig, false, true)\n}\n\nfunc newPionAPIWithOptions(relayConfig config.CodexLiveMediaRelayConfig, filterPrivateRemoteIPs, loopbackOnly bool) (*webrtc.API, error) {\n\tmediaEngine := &webrtc.MediaEngine{}\n\tif errRegister := mediaEngine.RegisterCodec(webrtc.RTPCodecParameters{\n\t\tRTPCodecCapability: opusCodec,\n\t\tPayloadType:        111,\n\t}, webrtc.RTPCodecTypeAudio); errRegister != nil {\n\t\treturn nil, fmt.Errorf(\"register Opus codec: %w\", errRegister)\n\t}\n\tinterceptorRegistry := &interceptor.Registry{}\n\tif errRegister := webrtc.RegisterDefaultInterceptors(mediaEngine, interceptorRegistry); errRegister != nil {\n\t\treturn nil, fmt.Errorf(\"register WebRTC interceptors: %w\", errRegister)\n\t}\n\tsettingEngine := webrtc.SettingEngine{}\n\tif !loopbackOnly {\n\t\tif relayConfig.UDPPortMin != 0 {\n\t\t\tif errPorts := settingEngine.SetEphemeralUDPPortRange(relayConfig.UDPPortMin, relayConfig.UDPPortMax); errPorts != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"configure WebRTC UDP port range: %w\", errPorts)\n\t\t\t}\n\t\t}\n\t\tif publicIP := strings.TrimSpace(relayConfig.PublicIP); publicIP != \"\" {\n\t\t\tsettingEngine.SetNAT1To1IPs([]string{publicIP}, webrtc.ICECandidateTypeHost)\n\t\t}\n\t}\n\tif filterPrivateRemoteIPs {\n\t\tsettingEngine.SetRemoteIPFilter(isPublicRemoteIP)","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/client/codex/live/media.go#L198-L234","documentation":"Error \"register Opus codec: %w\" thrown in router-for-me/CLIProxyAPI.","triggerScenarios":"Thrown at internal/client/codex/live/media.go:216 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the Opus codec dependency is available and compatible.","Check the wrapped registration error from the media engine."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"78f0c4079e3e6273d65d03b5549cffc898703264","analyzedAt":"2026-08-15T12:26:37.444Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}