mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 03:53:09 +08:00
Added Media.seekTo(int milliseconds);
This commit is contained in:
parent
b94eedaf07
commit
ffbc010d7b
@ -156,7 +156,7 @@ Media.prototype.stop = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Seek or jump to a new time in the track.
|
* Seek or jump to a new time in the track..
|
||||||
*/
|
*/
|
||||||
Media.prototype.seekTo = function(milliseconds) {
|
Media.prototype.seekTo = function(milliseconds) {
|
||||||
PhoneGap.exec(null, null, "Media", "seekToAudio", [this.id, milliseconds]);
|
PhoneGap.exec(null, null, "Media", "seekToAudio", [this.id, milliseconds]);
|
||||||
|
@ -186,6 +186,7 @@ public class AudioHandler extends Plugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Seek to a location.
|
* Seek to a location.
|
||||||
|
*
|
||||||
*
|
*
|
||||||
* @param id The id of the audio player
|
* @param id The id of the audio player
|
||||||
* @param miliseconds int: number of milliseconds to skip 1000 = 1 second
|
* @param miliseconds int: number of milliseconds to skip 1000 = 1 second
|
||||||
|
@ -238,7 +238,7 @@ public class AudioPlayer implements OnCompletionListener, OnPreparedListener, On
|
|||||||
*/
|
*/
|
||||||
public void seekToPlaying(int milliseconds) {
|
public void seekToPlaying(int milliseconds) {
|
||||||
if (this.mPlayer != null) {
|
if (this.mPlayer != null) {
|
||||||
this.mPlayer.seekTo(milliseconds);
|
this.mPlayer.seekTo(milliseconds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user