Commit fafec810 authored by Adam Barth's avatar Adam Barth

Merge pull request #1193 from afandria/patch-1

Add reference to "mojo:media_service" in sound.dart
parents 7fb70ecc 9bf16fbd
......@@ -64,7 +64,7 @@ class PianoApp extends StatelessComponent {
Future loadSounds() async {
MediaServiceProxy mediaService = new MediaServiceProxy.unbound();
try {
shell.connectToService(null, mediaService);
shell.connectToService("mojo:media_service", mediaService);
List<Future<MediaPlayerPrepareResponseParams>> pending = <Future<MediaPlayerPrepareResponseParams>>[];
for (PianoKey key in keys)
pending.add(key.load(mediaService));
......
......@@ -67,7 +67,7 @@ class SoundEffectStream {
class SoundEffectPlayer {
SoundEffectPlayer(int maxStreams) {
MediaServiceProxy mediaService = new MediaServiceProxy.unbound();
shell.connectToService(null, mediaService);
shell.connectToService("mojo:media_service", mediaService);
_soundPool = new SoundPoolProxy.unbound();
mediaService.ptr.createSoundPool(_soundPool, maxStreams);
}
......@@ -146,7 +146,7 @@ class SoundTrackPlayer {
SoundTrackPlayer() {
_mediaService = new MediaServiceProxy.unbound();
shell.connectToService(null, _mediaService);
shell.connectToService("mojo:media_service", _mediaService);
}
MediaServiceProxy _mediaService;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment