-
Notifications
You must be signed in to change notification settings - Fork 845
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import 'dart:html'; | ||
|
||
import 'package:js/js.dart'; | ||
|
||
@JS('AudioContext') | ||
@staticInterop | ||
class JsAudioContext { | ||
external JsAudioContext(); | ||
} | ||
|
||
extension JsAudioContextExtension on JsAudioContext { | ||
external MediaElementAudioSourceNode createMediaElementSource( | ||
AudioElement element,); | ||
|
||
external StereoPannerNode createStereoPanner(); | ||
|
||
external AudioNode get destination; | ||
} | ||
|
||
@JS() | ||
@staticInterop | ||
abstract class AudioNode { | ||
external AudioNode(); | ||
|
||
} | ||
|
||
extension AudioNodeExtension on AudioNode { | ||
external AudioNode connect(AudioNode audioNode); | ||
} | ||
|
||
@JS() | ||
@staticInterop | ||
class AudioParam { | ||
external AudioParam(); | ||
} | ||
|
||
extension AudioParamExtension on AudioParam { | ||
external num value; | ||
} | ||
|
||
@JS() | ||
@staticInterop | ||
class StereoPannerNode | ||
implements AudioNode { | ||
external StereoPannerNode(); | ||
} | ||
|
||
extension StereoPannerNodeExtension on StereoPannerNode { | ||
external AudioParam get pan; | ||
} | ||
|
||
@JS() | ||
@staticInterop | ||
class MediaElementAudioSourceNode | ||
implements AudioNode { | ||
external MediaElementAudioSourceNode(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters