Javascript Audiocontext Oscillator Not Working on Windows Edge or Android Browsers - chromium

The code is complete.
No sound produced.
Tried on Windows Edge Version 109.0.1518.70 (Official build) (64-bit)
Fresh reinstall of Andriod OS and also Windows Install and Upgraded.
I have tried old Audiocontext Oscillator app code
that worked on my previous mobile phones in 2021. Nothing.
All other offline and online sound apps work.
alert("your code is ok to run")
var audioContext = new window.AudioContext()
alert("recognise audio object")
var oscillator = audioContext.createOscillator();
alert("recognise oscillator object")
oscillator.connect(audioContext.destination);
//I am going to say 440
alert(oscillator.frequency.value)
oscillator.start(0)
alert("the code compiled. yeah!, increase the volume. can you hear it? I cant.")

If you can't heat anything it's most likely blocked by the browser's autoplay policy. You need to run your code in response to a user action. If you would for example do it within a button's click handler it should work as expected.
document.getElementById('the-id-of-a-button').onclick = () => {
// the code from above
};

Related

Newbie cannot properly run or debug fresh project using Gluon multi-view with FXML in IntelliJ

I created a brand new Gluon mobile multi view with FXML project in IntelliJ CE 2018.2.1 using the Gluon plugin version 2.7.0 and Gradle 4.10.1
I open the Gradle tool window, Pick Project(root), Tasks, Application, run and I do see the generated application run properly, I believe, though it defaults to a mobile device sized window.
I get this error message:
SEVERE: javafx.platform is not defined. Desktop will be assumed by default.
What I'd like to do is debug a single JavaFX program in IntelliJ for all of the supported platforms (except embedded) in Windows and see more or less the right screen sizes before I start plugging in my iPad/iPhone/Android phone/Android tablet/Mac just to get the code logic right.
Is there some setting that would let me switch between simulating different devices as a first stage?
When I double click "debug" I get the following message and the window hangs.
Listening for transport dt_socket at address: 5005
Is this related? Are we trying to debug an actual device by accident?
As for the app size, when you run on desktop it defaults to a phone form factor of 335x600. This comes from the Display service:
#Override
public Dimension2D getDefaultDimensions() {
return isTablet() ? new Dimension2D(900, 600) : new Dimension2D(335, 600);
}
You can change to a tablet format of 900 x 600 if you set the charm-desktop-form system property to tablet.
Or you can simply override these settings, and set your desired size:
#Override
public void postInit(Scene scene) {
Swatch.BLUE.assignTo(scene);
if (Platform.isDesktop()) {
((Stage) scene.getWindow()).setWidth(400);
((Stage) scene.getWindow()).setHeight(800);
}
}
When you deploy your app to a mobile device, it will just adjust to the size of its screen.
Related to the message javafx.platform is not defined running on desktop, that system property is not defined, so it is a warning message that informs that desktop is selected. When you run on mobile, the proper Android or iOS value will be set for the platform.
Finally, about debugging, when you run on desktop you initially can debug only the desktop application, but you can modify the size of the application as mentioned above.
To debug the mobile application, you have to run either the iOS simulator or the Android emulator.
This question shows how to debug on Android from IntelliJ, but you have to actually deploy the application to a mobile device.
On iOS, providing you have a Mac, you can use the launchIPhoneSimulator task to launch the iOS simulator, where you can choose any of the possible iPhone or iPad devices with their different screens resolutions. In this case you don't need a device.
Solution to part 2: Debug the Desktop version from inside IntelliJ.
In IntelliJ, make a new Run configuration of type Gradle and use "run" not "debug" as the "task". Then choose "backpack [run]" from the toolbar and use the "debug" icon on the toolbar. IntelliJ will run the app with the JDWP options enabled and connect the debugger to it.

Forcing refresh of a published Expo app

could somebody explain how the Expo client decides whether to refresh my app or use the current version cached (~already downloaded) in the client?
When I'm pushing out a new version with exp push, the Expo app (on Android) doesn't seem to pick it up, unless I clear all data of the app.
I thought that bumping the expo.version in the app.json would solve this but this doesn't seem to be the case.
Thanks!
UPDATE
Ok, I understand it is supposed to happen automatically, but this doesn't seem so - I tried multiple devices which were not offline - I suppose there must be something obvious I'm missing...
https://docs.expo.io/versions/latest/guides/offline-support.html#load-js-updates-in-the-background
Check that you don't have this option on the app.json file:
"updates": {
"fallbackToCacheTimeout": 0
},
I had this option in there and it prevented the app from waiting for a new version to be downloaded.
(on Android) I succeeded by opening the app in Expo, I would see the cached version, then I force stopped the app intentionally, both the app and the expo client. This removes it from the list of open apps on the phone.
Relaunched the expo client, then tapped my demo app again, and it loaded the new version. Tested a few seconds after publishing.

Active X VLC Plugin Issues

Im using a very basic ActiveX VLC Plugin. I installed VLC and then added VLC into VB.NET by going into COM Components.
So I use it to load livestreams and it works "fine".
But not great. The reason im saying this is because I load a .m3u8 file and whenever it lags/buffers/freezes/pauses e.t.c it will play again fine as I have it to "AutoLoop = true" but when it then fixes itself and continues playing it wont go Fullscreen by double clicking the Video Window and if I went into Fullscreen before it froze I would be Stuck in fullscreen and would need to ALT+F4 or ALT+TAB out and close the App.
Is there any way past this and has anyone ever encountered this issue either?
If anyone needs to try this to see what I mean or has a hard time understanding what I mean just let me know.
I can confirm this is an error with VLC 2.2.2
It seems this is a UI issue when playback ends. The forum seems to already have a ticket open about this for 3+ months which is ridiculous that its still not fixed.
If you compile using the .dll's from VLC 2.2.2 but have VLC 2.2.1 installed on your PC then this issue is gone.

icon not change in device

For the icon change effect on the android emulator and device if i install manually .apk .ipa file . It works fine after changing the application icon and uploaded mobilefirst console in the production environment.
but problem is marketing manager mail me . application updated but not changed the Application icon in iOS and android device.
at this situation what can i do ?
I flowing this
link
It is not clear to me whether you refer to the icon that you see on the device home screen or to the icon that you see in the AppCenter console.
The icon on the home screen is managed by the device OS, and Idan's answer is correct here. This effect has nothing to do with IBM AppCenter but rather with the device OS.
The icon in the IBM AppCenter console is cached for 30 minutes in the browser, in order to allow the browser to refresh the screen more quickly. The idea is that icons change rarely and speed it important. There is a Java VM property ibm.appcenter.services.iconCacheMaxAge (in seconds) that can be set to a different value to modify this effect.
Based on the comments, an update will not take place if you did not increment the version number of the application.
If you change a native resource such as the app icon, but do not increment the application version number then the check for a new version will not see the update because it is basing it on the version number.
Update the version number and upload the updated .apk and .ipa; the update should then happen.

Render camera preview in Chrome using Native Client SDK

I'm trying to write ppapi plugin for Chrome which will use webcam (show preview and write file). I have installed NaCl sdk with pepper_35.
There available examples in /examples/api/ folder: media_stream_audio and media_stream_video.
The audio example works fine - requests access to microphone and shows some kind of preview.
The "media_stream_video" example must show web-camera video preview, but when I load example on the local web server (with make serve command), there appears red rect, and Chrome asks for the web camera access. When I click “allow” - webcam indicator lights-up, chrome show that web page uses the web camera, and I see the camera settings icon. But the preview doesn't work, there still red rectangle instead.
I checked this on Windows 8.1, Windows 7 and Mac OS X, with five different webcams, and have no idea what can be wrong.
Maybe someone already encountered with the same problem?
Installing the pepper_37(dev) version of NaCl SDK solved the problem. Looks like it is unstable version currently, but it works.