Microphone input iOS mediastreamtrack (Web App) - javascript

I am working on a project that requires a mic input from a mobile phone. I am using the p5.js sound library and everything is working fine on Android (Chrome). Unfortunately I get the message "mediastreamtrack not supported" when I open the website in iOS (both Safari and Chrome).
After some searching, it seems like it is just not supported by Safari or iOS in general?
I wasn't able to find an solution so far. Is there a way to fix this, a way to work around it? I am using getLevel(), fft.analyze(), and fft getEnergy(). But it would be enough to just get the Level.
Basically, I just want to find out if there is an input above a certain level.
I want to avoid creating an App for it and have the function implemented in a website.
Thank you!

Related

Is there any way to vibrate on iOS Safari without React?

I know that Safari doesn't support the API Vibration.
Yet, while going on this page (https://www.vanmoof.com/fr-FR/s3?color=light) I noticed haptic feedbacks while pressing buttons ON MY IPHONE. I'm so desperate to use this technology for web interfaces yet never found a trick to make it works on iOS.
Seeing that website, I discovered that the Vibration Plugin for React can make the magic happens.
My question is: Is there any way to bypass Vibration API, which is not supported by iOS, to vibrate in order to give feedback? I also do not want to use React.

Barcode Scanning Via Mobile Browser?

I am looking at trying to scan barcodes from a mobile device.
I been doing some research and I having hard time finding JavaScript libraries that can do this.
I see these projects
zxing
This seems to be no longer in development and just bugs fixes are done?
QuaggaJS
This one, I am not sure if it is development either anymore as changelog is from 2017
quagga2
This seems to be a fork of the one above? So this might be the better choice to go with vs the 2?
What I am trying to achieve is this. I want to go on an andriod device (think phone, maybe tablet), load up chrome or firefox, go to my site click a button and load up the devices camera and scan a bar code (mostly EAN-8/13).
I want to do the same thing on apple devices (iphone and ipad), load up safari (not sure if they got chrome and Firefox on these devices. I don't own apple), click a button and load up their devices cameras and scan a bar code.
I think this is possible in all the libraries I listed above, but I am still unclear if this is possible on apple devices? I read somewhere that before ios 14 it would not be possible?
I am open to other libaries, I can use Jquery, vanilla javascript and I think angular (but I think it is version 3).
Just been doing this same research myself. All of those open source ones you listed seem to be either dead or have performance/reliability issues. Looks like only the commercial versions are really viable at the moment:
Dynamsoft - https://www.dynamsoft.com/store/dynamsoft-barcode-reader/
Scanbot - https://scanbot.io/products/barcode-software/web-barcode-scanner/
There are also two different mobile apps that are viable. These are web apps that just display a browser view and make a barcode scanning function from the app itself available on the page:
https://berrywing.com/scan-to-web-app/
https://www.mochasoft.dk/iphone_barcode2.htm
The second one has a more capable JS API of the two.
UPDATE: I went with that last option from Mochasoft. Turned out quite well.

Html5 desktop webapp options besides titanium

I'm making a html5 game and while I'd like to be able to publish the game to a web platform like chrome store, the game plays closer to a traditional desktop game. So I'd like to be able to make it for the desktop too and take advantage of desktop app stores as well.
Air would have been ideal except that they dropped support for linux which is my main platform. I liked Titanium but it doesn't have support for html5 audio yet and installing it onto linux can be tricky sometimes. I researched Phonegap but it's targeted toward mobile and not desktop. Is there a simple platform out there that'll just let me wrap my app in a webkit frame or something?
All I want to do is have my game run in a browser frame, I don't need any crazy features like a server because all it is is html and javascript, nothing server side. With all the cool things out there like Titanium and phonegap I'm positive there has to be something simple like this out there.
Thanks a lot
Blender was right. XULrunner was a great platform. I literally had my webapp up and running within a few hours of going through tutorials and docs. Works great, I'd recommend it to anyone else with this need at least until someone makes something a bit more documented.
Here's a good starter tutorial:
http://www.kodewerx.org/wiki/A_Brief_Introduction_To_XULRunner:_Part_1
And a hint, no need to download XULrunner while developing, firefox has a command line argument for it. Just
$ firefox -app /path/to/application.ini
And it'll run. So if you have firefox, you have XULrunner. And it'll work at least until release.

How to detect shake in iphone browser?

There's questions about they're either old or don't give an answer.
I'm not good at javascript, I'm alright at jQuery.
How would I do something when a shake is detected in the iphone browser? I'm planning on changing the url and sending the user back to the 'library' page of the website when a shake is detected.
From what I read, Android doesn't yet allow access to the accelerometer in the browser. Chrome for Android just came out last month though, and I'm not sure if it's supported in it yet, so I guess this question is just for the iPhone, and Android if anyone knows if it supports it yet. I'm assuming the same code would work for both.
if you are using jquery, You can use my js lib https://github.com/GerManson/gShake

is Mobilizer capable of emulating perfectly the behavior of scripts as well?

I recently took a look at Mobilizer http://www.springbox.com/mobilizer/
It's pretty amazing, being able to simulate the interfaces of iphones and stuff.
However, my question is that is it actually capable of rendering the exact same behavior not just for layout but for the javascript scripts?
I mean it will pretty hurt to find out that the script ran correctly in the emulator only to fail in the real scenario...
This program will not emulate the actual phone OS. As far as I can tell, it is just loading up the page in an internal (desktop based) browser and displaying it within the phone with the correct dimensions etc. It is probably sending the User Agent string that belongs to that device as well.
So, It is useful for testing your layout on different screen sizes, testing your mobile redirect scripts and saving out mockups of the website on a device for clients.
It is definitely not to be used to test if your website will work on that device.
To accurately test without a physical device on:
iOS, check out the iOS simulator that comes with X Code.
Android, check out the Android emulator that comes with the Android SDK.
WebOS, check out the WebOS emulator from the webOS SDK
Blackberry, check out the Blackberry Simulators (Windows only)
Unfortunately, there is no app that makes testing on all these devices easy as it seemed 'Mobilizer' did. If you can, it's always good to test on the actual devices too as emulators aren't always perfect.

Categories

Resources