Issue with `getByteFrequencyData` on LG Webos Device

I am writing to bring to your attention an issue we have encountered with the getByteFrequencyData method of the Web Audio API when running our web application on the LG StandbyME device. While our application performs as expected in the WebOS Studio emulator, it fails to retrieve any frequency data when deployed on the actual hardware.

Background

Our web application utilizes the Web Audio API to analyze and visualize audio data. Specifically, we use the getByteFrequencyData method from an AnalyserNode to obtain frequency data for visualization purposes. The implementation follows standard practices as recommended in the Web Audio API documentation.

Issue Description

When executing the following code on the LG StandbyME device, the dataArray filled by getByteFrequencyData remains empty, indicating that no frequency data is being captured:

const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
const audioElement = document.getElementById('audio');
const sourceNode = audioCtx.createMediaElementSource(audioElement);
const analyser = audioCtx.createAnalyser();

analyser.fftSize = 2048;
const bufferLength = analyser.frequencyBinCount;
const dataArray = new Uint8Array(bufferLength);

sourceNode.connect(analyser);
analyser.connect(audioCtx.destination);

function draw() {
    requestAnimationFrame(draw);
    analyser.getByteFrequencyData(dataArray);
    console.log(dataArray); // Data array is empty on LG StandbyME device
}

audioElement.onplay = () => {
    audioCtx.resume().then(() => {
        console.log('Playback resumed');
    });
    draw();
};

audioElement.play();

Observations

  1. WebOS Studio Emulator: The code works as expected, with getByteFrequencyData returning valid frequency data.
  2. LG StandbyME Device: The getByteFrequencyData method returns an array of zeros, indicating that no frequency data is captured.

Steps to Reproduce

  1. Deploy the above code on an LG StandbyME device.
  2. Play an audio file using the provided audio element.
  3. Observe the console output of the dataArray from the getByteFrequencyData method.

Expected Behavior

The getByteFrequencyData method should return an array containing frequency data corresponding to the audio currently being played, similar to its behavior in the WebOS Studio emulator.

Actual Behavior

On the LG StandbyME device, the dataArray remains empty (all zeros), indicating that no frequency data is being captured.

Impact

This issue prevents us from delivering the expected audio visualization features in our web application when run on the LG StandbyME device. As a result, it affects the user experience and the functionality of our application.

Request

We kindly request your assistance in investigating this issue. Specifically, we would like to know:

  • Whether there are known limitations or additional configurations required for using the Web Audio API on LG StandbyME devices.
  • Any recommended workarounds or solutions to ensure the getByteFrequencyData method works correctly on this device.

We appreciate your prompt attention to this matter and look forward to your response.

In webOS TV, video/audio is not accessible. You can’t get the audio data. Sorry for not being helpful.