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 { ...@@ -64,7 +64,7 @@ class PianoApp extends StatelessComponent {
Future loadSounds() async { Future loadSounds() async {
MediaServiceProxy mediaService = new MediaServiceProxy.unbound(); MediaServiceProxy mediaService = new MediaServiceProxy.unbound();
try { try {
shell.connectToService(null, mediaService); shell.connectToService("mojo:media_service", mediaService);
List<Future<MediaPlayerPrepareResponseParams>> pending = <Future<MediaPlayerPrepareResponseParams>>[]; List<Future<MediaPlayerPrepareResponseParams>> pending = <Future<MediaPlayerPrepareResponseParams>>[];
for (PianoKey key in keys) for (PianoKey key in keys)
pending.add(key.load(mediaService)); pending.add(key.load(mediaService));
......
...@@ -67,7 +67,7 @@ class SoundEffectStream { ...@@ -67,7 +67,7 @@ class SoundEffectStream {
class SoundEffectPlayer { class SoundEffectPlayer {
SoundEffectPlayer(int maxStreams) { SoundEffectPlayer(int maxStreams) {
MediaServiceProxy mediaService = new MediaServiceProxy.unbound(); MediaServiceProxy mediaService = new MediaServiceProxy.unbound();
shell.connectToService(null, mediaService); shell.connectToService("mojo:media_service", mediaService);
_soundPool = new SoundPoolProxy.unbound(); _soundPool = new SoundPoolProxy.unbound();
mediaService.ptr.createSoundPool(_soundPool, maxStreams); mediaService.ptr.createSoundPool(_soundPool, maxStreams);
} }
...@@ -146,7 +146,7 @@ class SoundTrackPlayer { ...@@ -146,7 +146,7 @@ class SoundTrackPlayer {
SoundTrackPlayer() { SoundTrackPlayer() {
_mediaService = new MediaServiceProxy.unbound(); _mediaService = new MediaServiceProxy.unbound();
shell.connectToService(null, _mediaService); shell.connectToService("mojo:media_service", _mediaService);
} }
MediaServiceProxy _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