dart_web_audio 0.1.2 copy "dart_web_audio: ^0.1.2" to clipboard
dart_web_audio: ^0.1.2 copied to clipboard

A thin wrap over JS audio APIs for Dart/Flutter. This is used by the audioplayers package to provie support for Flutter Web.

example/main.dart

import 'dart:html';

import 'package:dart_web_audio/dart_web_audio.dart';

void main() async {
  final AudioContext _audioCtx = AudioContext();

  const kUrl2 = 'https://luan.xyz/files/audio/nasa_on_a_mission.mp3';
  final HttpRequest response = await HttpRequest.request(kUrl2, responseType: 'arraybuffer');
  final AudioBuffer buffer = await _audioCtx.decodeAudioData(response.response);

  final node = _audioCtx.createBufferSource();
  node.buffer = buffer;

  node.start();
}
0
likes
30
pub points
24%
popularity

Publisher

unverified uploader

A thin wrap over JS audio APIs for Dart/Flutter. This is used by the audioplayers package to provie support for Flutter Web.

Repository (GitHub)
View/report issues

Dependencies

js

More

Packages that depend on dart_web_audio