diff --git a/examples/widgets/piano.dart b/examples/widgets/piano.dart index 155fdf98343..02e914f7f9b 100644 --- a/examples/widgets/piano.dart +++ b/examples/widgets/piano.dart @@ -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> pending = >[]; for (PianoKey key in keys) pending.add(key.load(mediaService)); diff --git a/packages/flutter_sprites/lib/src/sound.dart b/packages/flutter_sprites/lib/src/sound.dart index f3b748e13f6..76395b0d6f0 100644 --- a/packages/flutter_sprites/lib/src/sound.dart +++ b/packages/flutter_sprites/lib/src/sound.dart @@ -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;