AppMare.MauiWeb.Audio
1.0.5
dotnet add package AppMare.MauiWeb.Audio --version 1.0.5
NuGet\Install-Package AppMare.MauiWeb.Audio -Version 1.0.5
<PackageReference Include="AppMare.MauiWeb.Audio" Version="1.0.5" />
<PackageVersion Include="AppMare.MauiWeb.Audio" Version="1.0.5" />
<PackageReference Include="AppMare.MauiWeb.Audio" />
paket add AppMare.MauiWeb.Audio --version 1.0.5
#r "nuget: AppMare.MauiWeb.Audio, 1.0.5"
#:package AppMare.MauiWeb.Audio@1.0.5
#addin nuget:?package=AppMare.MauiWeb.Audio&version=1.0.5
#tool nuget:?package=AppMare.MauiWeb.Audio&version=1.0.5
AppMare.MauiWeb.Audio — Plugin.Maui.Audio on the web
This is not a new audio library. It is web support for
Plugin.Maui.Audio. You keep using
Plugin.Maui.Audio and its API (AudioManager.Current, IAudioManager, IAudioPlayer,
IAudioRecorder, IAudioStreamer). This package makes that same code run in the visitor's
browser when your .NET MAUI app runs as a website with MauiWeb.
Setup
Your MAUI app already references Plugin.Maui.Audio and calls AddAudio(). Add this package to
the web host and turn it on after UseMauiWeb():
dotnet add package AppMare.MauiWeb.Audio
app.MapMauiWeb(() => MauiProgram.CreateMauiApp(b => b
.UseMauiWeb()
.UseMauiWebAudio()));
No other changes. Your players, recorders and streamers now work in the browser.
What works in the browser
- Players:
Play,Pause,Stop,Seek,Volume,Balance,Speed(0.25 to 4) andLoop. Sound comes from a stream or a file inResources/Raw.Duration,CurrentPosition,IsPlaying,PlaybackEndedandErrorcome back from the browser. - Recorder: records the microphone to a WAV file with the options' sample rate, channels and
bit depth.
StopAsyncreturns it as a file. - Streamer:
OnAudioCapturedreceives raw PCM about ten times a second.
Web differences
- Browsers play sound only after the visitor has tapped the page. A
Playbefore that asks them to tap once. - Recording needs an https:// page, and the browser asks the visitor for the microphone.
- Recordings are WAV; other encodings throw
NotSupportedExceptionwhenThrowIfNotSupportedis set.
See it running
- Live gallery (every control, with its source): https://mauiweb.appmare.com/gallery.html
- Sample apps running as websites, such as Maui Planets: https://live.mauiweb.appmare.com/planets (all ten in the gallery's Samples section; source at https://github.com/appmare)
Links
- Live demo: https://live.mauiweb.appmare.com/audio
- Docs: https://mauiweb.appmare.com/docs.html#addons
- MauiWeb is a commercial product by AppMare, free for local development. Licence and pricing: https://mauiweb.appmare.com/pricing.html
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- AppMare.MauiWeb (>= 1.0.5)
- Microsoft.Maui.Controls.Core (>= 11.0.0)
- Plugin.Maui.Audio (>= 4.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.