Merge pull request #2186 from jason-simmons/sound_track_volume

Add MediaPlayer methods for volume and looping
This commit is contained in:
Jason Simmons 2015-12-15 12:24:04 -08:00
commit 0cca3dd352
2 changed files with 12 additions and 0 deletions

View File

@ -12,6 +12,8 @@ interface MediaPlayer {
Start();
Pause();
SeekTo(uint32 msec);
SetVolume(float volume);
SetLooping(bool looping);
};
[ServiceName="media::SoundPool"]

View File

@ -107,4 +107,14 @@ public class MediaPlayerImpl implements MediaPlayer, android.media.MediaPlayer.O
public void pause() {
mPlayer.pause();
}
@Override
public void setLooping(boolean looping) {
mPlayer.setLooping(looping);
}
@Override
public void setVolume(float volume) {
mPlayer.setVolume(volume, volume);
}
}