-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Waveform microphone plugin is not mobile responsive #915
Comments
Hi @ToJen, can you please provide a screenshot? There isn't enough information in your question for me to know what might be the issue. Try going to https://wavesurfer-js.org/ on your mobile device, does the waveform look okay for you there? If so, the issue is likely with your HTML file not having the correct viewport settings (see https://developer.mozilla.org/en/docs/Mozilla/Mobile/Viewport_meta_tag). |
@chrisparton1991 I've just updated the issue with a link to the image. |
@katspaugh is there a way I can use |
@ToJen, can you provide a better description? waveform is not mobile responsive can mean many things. Cheers. |
@thijstriemstra hi, i meant to say that while I using the I attached a screenshot to the original question above ^^^ |
@ToJen what browser? what platform? the waveform looks like room ambient noise, what kind of audio are you providing in that example? |
@thijstriemstra on firefox, chrome, safari for android and iOS. I've tested with loud music right in front of the microphone and it only comes up as tiny spikes. |
But the thing is, if you launch mobile view on chrome(desktop), it'll come out looking fine. Try this on your phone and see what I mean. |
@ToJen what device? |
@thijstriemstra do you mean the device i'm testing it on? iPhone 5 and 6, LG l90, samsung galaxy, google nexus, different types |
yep. cool thanks, I'll test and post a screenshot asap. |
alright, thank you! |
@thijstriemstra were you able to see what I was talking about |
@ToJen you can make it responsive with the following for now.
|
Hello @entonbiba, Thanks but the waveform still remains really thin on mobile view even after using that. |
@ToJen try adding |
@entonbiba thanks, Thanks again. |
I couldn't reproduce it on Android 6 using latest Firefox. Loud speech or music brings the microphone waveform at around 90% of the waveform div. |
@thijstriemstra hmm yes, it looks good on the mobile view of browsers but on an actual phone it shrinks to a very thin line. I also thought it was working perfectly when I tested different screen sizes in Chrome's dev mode but after testing on the real phones it turned out differently. Would the |
@ToJen there is parameter called barWidth, try changing that to like 10 or something and see what happens? The microphone plugin might require a custom parameter to allow for larger waveform bar heights. |
@entonbiba hey, i did that yesterday and it increases the width but i think for design consistency i may have to use a curved waveform. is there a |
@ToJen no since the height of the waveform should be determined based on peaks of the audio file or in this case the microphone. I'll create an example with a barHeight parameter which will increase the height of the bars and waveform for testing. |
@entonbiba that sounds good, thanks! |
Hey @entonbiba, any luck yet? Is there something I can do? I'd love to contribute to this. |
@ToJen here you go, |
hey @entonbiba thanks, is it available in the current release? I have my script tags like this:
|
@ToJen The PR isn't merged/released yet. |
@mspae Oh cool, thanks! |
Looks perfect on desktop but the wave becomes too thin.
I'm only using the microphone so
waveform.zoom
may not be a solution.This is what I think might be help but it remains the same:
wavesurfer.on('ready', function() { wavesurfer.zoom(100); console.log("zoomed"); });
Here's a screenshot of what it looks like right now.
You can also run the demo plugin here on mobile to see what I mean.
The text was updated successfully, but these errors were encountered: