Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blob.size on Android is twice+ bigger than on Windows #864

Open
Aroxed opened this issue Feb 2, 2024 · 0 comments
Open

blob.size on Android is twice+ bigger than on Windows #864

Aroxed opened this issue Feb 2, 2024 · 0 comments

Comments

@Aroxed
Copy link

Aroxed commented Feb 2, 2024

Hi!
Firstly, thanks for the great library.
I have an issue related to ondataavailable function and its 'blob' argument size. Here is the snippet of my code:

        recorder = RecordRTC(microphone, {
            recorderType: StereoAudioRecorder,
            type: 'audio/wav',
            mimeType: 'audio/webm;codecs=pcm',
            numberOfAudioChannels: 1,
            bufferSize: 1024,
            desiredSampRate: 8000,
            timeSlice: 40,
            ondataavailable: function(blob) {
                document.getElementById('print').innerHTML += ' ' + blob.size
                //...
            }
        }

When I run this code on Windows 10 Chrome browser I have such a list of blob.sizes:

726 726 726 726 1068 726 1068 726 1068 726 726 726 1068 726 1068 726 1068 726 1068 726 726 1068 726 726 1068 726 726 1068 726 726 1068 726 726 1068 726 726 1068 726 726 1068 1068 726 726 1068 726 1068 1068 386 1410 726 726 1068 726 726 726 1068 1068 726 726 1068 726

When I run the same code using Android Chrome browser I have another list of blob.sizes:

8236 2434 2774 2774 2774 2774 2774 1410 1410 2774 2774 2774 2774 2774 2774 2092 726 2774 2774 2774 2774 2774 2774 2774 2434 2774 2774 2774 2774 1410 1410 2774 2774 2774 2774

Settings timeSlice as 100 or 20 leads to the same results: on Android values are close to 2000-2800 bytes.

Please help me either to have the same values of sizes or explain to me how to deal with Android-related data.
Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant