browser-web-apis

npm

Angular services for structured, secure, and reactive access to Browser Web APIs.

TypeScriptmain.ts
import { provideBrowserWebApis, provideCamera, provideGeolocation } from '@angular-helpers/browser-web-apis';
  
  bootstrapApplication(AppComponent, {
    providers: [
      provideBrowserWebApis({
        services: [provideCamera(), provideGeolocation()],
      }),
    ],
  });

πŸ“·
Media & Device

CameraService

Manages camera access via the MediaDevices API. Handles permission checks, stream lifecycle, and photo capture with typed constraints.

Explore API→

GeolocationService

Wraps the Geolocation API with typed Promises and Observables. Supports one-time position queries and continuous position watching with automatic cleanup.

Explore API→

MediaDevicesService

Enumerates and manages media input/output devices (cameras, microphones, speakers). Provides reactive device change detection.

Explore API→

MediaRecorderService

Wraps the MediaRecorder API for recording audio and video from a MediaStream. Provides start, pause, resume, and stop controls with Observable state and data streams.

Explore API→

VibrationService

Triggers haptic feedback patterns via the Vibration API. Includes built-in presets for common interactions (success, error, notification, double-tap).

Explore API→

SpeechSynthesisService

Text-to-speech via the Web Speech Synthesis API. Supports voice selection, language, pitch, rate, and volume. Exposes speaking state as an Observable.

Explore API→

IdleDetectorService

Detects user idle state and screen lock status using the Idle Detection API. Useful for auto-logout, presence indicators, or pausing resource-intensive tasks.

Explore API→

EyeDropperService

Provides access to the EyeDropper API for picking colors from anywhere on the screen. Opens a system color picker that returns the selected color in sRGB hex format.

Explore API→

BarcodeDetectorService

Wraps the Barcode Detection API (Shape Detection API) for scanning barcodes and QR codes from images, video frames, or canvas elements.

Explore API→

WebAudioService

Manages Web Audio API contexts, nodes, and audio processing. Supports oscillators, gain control, analysers for visualization, audio decoding, and playback.

Explore API→

GamepadService

Provides access to the Gamepad API for reading game controller input. Supports connection events, polling for button/axis state, and listing connected gamepads.

Explore API→

WebBluetoothService

Provides access to the Web Bluetooth API for connecting to Bluetooth Low Energy (BLE) devices. Supports device discovery, GATT service/characteristic read/write, and notifications.

Explore API→

WebUsbService

Provides access to the WebUSB API for communicating with USB devices from the browser. Supports device discovery, configuration, interface claiming, and data transfer.

Explore API→

WebNfcService

Provides access to the Web NFC API for reading and writing NFC tags. Supports NDEF message scanning and writing.

Explore API→

πŸ‘
Observer APIs

πŸ–₯
System APIs

🌐
Network APIs

πŸ’Ύ
Storage & I/O

βš™
Web Worker & Compute

πŸ”
Security & Permissions