How to play system sound in flutter web? - flutter

How to play system sound in flutter web without using any packages in all platform ?
I've tried await SystemSound.play(SystemSoundType.alert); but no alert tone played.

The web platform currently does not support playing sounds, so this call will yield no behavior on that platform.
source : https://api.flutter.dev/flutter/services/SystemSound/play.html

Related

Record screen with flutter in the background as a stream

So I want to create an app for android and ios that allow the user to stream their screen to another place, I'm thinking something like google cast and the likes
I can easily find flutter screen recording, for android and ios in one package, but there doesn't seem to be one that lets me capture the screen to a stream of some sort (i do NOT want it saved as a file)
I'm thinking I could maybe create my own package for this, in which case, is there any kind of "standard" video stream in a flutter that would widely be accepted to just work, like a google cast API or whatever? From what I can find, there isn't...
There's a Flutter plugin (flutter_screen_recording) that you can use for screen capture on Android and iOS. Though this requires Android SDK 21+ and iOS 10+.
To start screen recording
bool started = FlutterScreenRecording.startRecordScreen(videoName);
then to end the recording
if(started){
String path = FlutterScreenRecording.stopRecordScreen;
debugPrint('Screen recording path: $path');
}

I'm finding a way to play mp3 file girectly taken from url in flutter

Yes, I saw some of the questions with android and javascript but I am unable to find a way to do that in a flutter. I want to play an mp3 which is directly taken from a URL. Currently, I'm using a URL Launcher which is working fine but it loads in the browser. Is there any other way to implement within flutter app?
Use package audioplayers 0.14.1 The documentation here says "To play a Remote File, just call play with the URL (the isLocal parameter is false by default):". Following code snippet may help :
play() async {
int result = await audioPlayer.play(url);
if (result == 1) {
// success
}
}
This link might help. It has multiple audio players with their pros and cons.
There are may audio plugins for flutter audio stream such as this. Just Audio Plugin
Just search in Flutter Pub and try other plugins. If none of them are currently working for you. Try a flutter method channel and create a native player in Java or Kotlin (a work around).

How to implement Audio Recorder in Flutter?

I want to implement Audio Recorder functionality in Flutter which is the same as WhatsApp Audio recording functionality with animation. I've searched lots of sites, documentation, and plugins but couldn't find anything perfect.
I have had success with this plugin for recording audio. https://github.com/ZaraclaJ/audio_recorder/
You could use platform-specific code to link your UI with android's audio recording API. The plugin listed above uses a similar approach and you can get an idea of how to implement this by following the code on the Github repository.

Android: How to achieve ARCore and Video call simultanously using same camera?

I'm developing an Android app where the user is in an ARCore Session and at the same time should be able to share the (raw, not augmented) camera video stream in a video call.
The used technologies are:
Unity 2018.1.6
Google ARCore Unity SDK package
WebRTC Video Chat Unity package
The required ARCore functionality and the WebRTC Video chat work great - but only individually. Regarding having both simultaneously I'm aware it cannot work immediately; in fact having built a test app I saw that starting the video call would stop ARCore preview and reverse, dependent on what is started later.
So my questions are:
Is there a way to extract the video stream from ARCore?
How do I use this video stream as input for the WebRTC video call?

Headphone control in flutter

How can I play and pause my audio from headphones in a flutter app? I am using audioplayer plugin for audio playback in my app. It is a basic media player. I tried searching on the web but wasn't able to find much. This was also missing from this player
https://github.com/amangautam1/flutter-musicplayer.
Any help would be appriciated.