▸case-01 Write a JavaScript function for an HTML5 multiplayer game to request user microphone access. Web developers often request full audio and video tracks together by passing { audio: true, video: true } to navigator.mediaDevices.getUserMedia. Configure the request so that only microphone audio is captured. | pass→pass | 10,980 | 18,241 | +66% | 1 | 1 | 0% | 1,669 | 1,282 | -23% | 0 | 0 | — |
▸case-02 In an in-game voice chat manager, implement a method to temporarily mute the local player's microphone output. Developers sometimes stop and destroy the entire audio stream using stream.getTracks().forEach(t => t.stop()), forcing re-negotiation upon unmuting. Change the track mute state without destroying the active MediaStream object. | pass→pass | 11,706 | 9,868 | -16% | 1 | 1 | 0% | 2,275 | 1,993 | -12% | 0 | 0 | — |
▸case-03 Construct the audio constraints object for capturing raw game player voice input using browser media streams. Base implementations frequently pass simple boolean { audio: true }, which relies on default system device behavior. Explicitly request hardware or software echo cancellation in the constraints object. | pass→fail | 14,444 | 9,421 | -35% | 1 | 1 | 0% | 2,207 | 1,511 | -32% | 0 | 0 | — |
▸case-04 Configure the WebRTC media track constraints for filtering background fan and room noise during voice chat capture. Developers typically depend on external post-processing libraries in WebAudio. Enable standard browser-level background noise suppression within the constraints object passed to getUserMedia. | pass→pass | 7,978 | 6,571 | -18% | 1 | 1 | 0% | 1,293 | 1,060 | -18% | 0 | 0 | — |
▸case-05 Configure WebRTC media track constraints for an in-game voice input stream to maintain consistent voice volume levels across different player headsets. Standard code snippets often omit automatic volume leveling. Enable browser-native automatic gain adjustment in the media track constraints. | pass→fail | 13,901 | 8,803 | -37% | 1 | 1 | 0% | 1,957 | 1,362 | -30% | 0 | 0 | — |
▸case-06 Modify a WebRTC SDP offer string for an interactive in-game voice chat connection. Engineers often leave G.711 PCMU/PCMA or G.722 as the top preferred audio payload types in the SDP m=audio header. Prioritize the low-latency interactive audio format optimized for real-time voice communication over legacy codecs. | pass→pass | 14,820 | 13,962 | -6% | 1 | 1 | 0% | 2,831 | 2,874 | +2% | 0 | 0 | — |
▸case-07 Select the ptime (packet duration in milliseconds) when encoding real-time voice chat packets using Opus for a fast-paced multiplayer FPS. Developers frequently use 60ms or 120ms frame sizes to minimize network header overhead at the cost of noticeable latency. Choose the frame size that balances low latency with standard IP packet overhead for real-time voice. | pass→pass | 6,474 | 6,346 | -2% | 1 | 1 | 0% | 1,122 | 1,185 | +6% | 0 | 0 | — |
▸case-08 Configure the channel count constraint for capturing player microphone input in a competitive online multiplayer game. Standard web audio code often defaults to stereo capture (2 channels), doubling the raw PCM bandwidth without enhancing voice clarity. Specify the optimal channel count for pure voice transmission. | pass→pass | 7,540 | 5,885 | -22% | 1 | 1 | 0% | 1,195 | 920 | -23% | 0 | 0 | — |
▸case-09 Configure the SDP fmtp parameters for an Opus voice stream in an in-game peer-to-peer audio session. standard settings default to high-fidelity music streaming rates around 128000 bps (128 kbps). Set the maximum average bitrate appropriate for clear, band-efficient voice communication. | pass→pass | 14,796 | 9,530 | -36% | 1 | 1 | 0% | 2,291 | 1,744 | -24% | 0 | 0 | — |
▸case-10 Configure the Opus codec parameters for a game voice chat system running over unreliable UDP connections prone to packet loss. Developers often rely solely on standard WebRTC jitter buffers without enabling codec-level redundancy. Enable built-in forward error correction directly in the Opus fmtp line. | pass→pass | 14,144 | 13,143 | -7% | 1 | 1 | 0% | 2,531 | 2,427 | -4% | 0 | 0 | — |
▸case-11 Configure the Opus encoder parameters for an in-game voice channel where players remain silent for long stretches. Base configurations continuously transmit full silence packets, wasting network bandwidth. Enable discontinuous transmission in the codec configuration. | fail→fail | 17,216 | 7,504 | -56% | 1 | 1 | 0% | 2,629 | 1,324 | -50% | 0 | 0 | — |
▸case-12 Set up a Web Audio API pipeline to process custom raw audio buffers from a player's microphone in modern browsers. Legacy implementations rely on the deprecated ScriptProcessorNode on the main UI thread. Specify the modern Web Audio API node designed for off-thread audio stream processing. | pass→pass | 14,490 | 15,893 | +10% | 1 | 1 | 0% | 2,854 | 2,632 | -8% | 0 | 0 | — |
▸case-13 Add a voice communication track to an existing RTCPeerConnection instance for an in-game player. Developers often use peerConnection.addStream(stream), which is deprecated in modern WebRTC specifications. Use the standard modern RTCPeerConnection method to add an audio track. | pass→pass | 6,034 | 6,998 | +16% | 1 | 1 | 0% | 1,343 | 1,130 | -16% | 0 | 0 | — |
▸case-14 Write an error-handling block for a game's voice initialization code when calling getUserMedia. Developers often catch errors using generic console.log(err) without identifying permission rejections. Handle the specific browser DOMException thrown when a user explicitly denies microphone access. | pass→pass | 10,889 | 12,480 | +15% | 1 | 1 | 0% | 2,237 | 1,987 | -11% | 0 | 0 | — |
▸case-15 Specify the sample rate in Hertz when initializing a Web Audio context dedicated to capturing and processing real-time microphone voice input. Many sample code snippets default to CD-quality 44100 Hz or high-end 96000 Hz. Choose the standard sample rate used by modern wideband/fullband voice codecs like Opus for optimal voice processing. | pass→pass | 5,478 | 4,632 | -15% | 1 | 1 | 0% | 987 | 891 | -10% | 0 | 0 | — |
▸case-16 Configure an RTCRtpSender or WebRTC peer connection to detect when a player is speaking without sending continuous silent audio packets. Basic voice chat implementations leave the audio track transmitting continuously at full bitrate. Specify the WebRTC configuration or track parameter used to monitor voice activity levels. | pass→pass | 16,809 | 17,500 | +4% | 1 | 1 | 0% | 3,096 | 2,835 | -8% | 0 | 0 | — |
▸case-17 Configure media track audio constraints for a game running on mobile devices where speaker output feeds back into the device microphone. Engineers often attempt to write custom FFT phase-inversion filters in JavaScript to remove echo. Specify the built-in browser constraint key used to eliminate speaker feedback from captured audio. | pass→pass | 5,834 | 4,381 | -25% | 1 | 1 | 0% | 977 | 759 | -22% | 0 | 0 | — |
▸case-18 Configure the receiver latency target on an RTCRtpReceiver for an interactive in-game voice chat stream where low latency is critical. Default configurations often buffer up to 300ms of audio to guarantee smoothness, introducing perceptible talkover delay. Set the jitterBufferTarget attribute on the receiver to balance smooth playout with minimal delay. | fail→pass | 10,223 | 6,787 | -34% | 1 | 1 | 0% | 1,930 | 1,251 | -35% | 0 | 0 | — |
▸case-19 Write a function for an in-game settings menu to list available hardware microphones so players can select their preferred input device. Developers often hardcode input devices or query navigator.plugins. Use the standard Web API method to retrieve all connected media input devices. | pass→pass | 9,337 | 9,064 | -3% | 1 | 1 | 0% | 1,797 | 1,776 | -1% | 0 | 0 | — |
▸case-20 Write a JavaScript function to filter profane words out of text messages sent in an in-game party chat box. | pass→pass | 13,615 | 13,212 | -3% | 1 | 1 | 0% | 2,367 | 2,359 | -0% | 0 | 0 | — |
▸case-21 Write a configuration object for encoding a game streamer's visual gameplay canvas stream using WebCodecs VideoEncoder. | pass→pass | 15,170 | 12,753 | -16% | 1 | 1 | 0% | 2,595 | 2,545 | -2% | 0 | 0 | — |
▸case-22 Calculate the panning and distance attenuation for a 3D environmental sound effect source relative to the player position using PannerNode. | pass→pass | 14,682 | 17,312 | +18% | 1 | 1 | 0% | 2,868 | 2,845 | -1% | 0 | 0 | — |