summaryrefslogtreecommitdiffstats
path: root/core/java/android/webkit/HTML5VideoViewProxy.java
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-01-17 18:08:56 +0000
committerBen Murdoch <benm@google.com>2011-01-19 11:48:15 +0000
commitff19d19e016f67edf0a4e8eea374d144dc5129ef (patch)
treee4ec3732d11645bd8eef473a954c45e214841b4b /core/java/android/webkit/HTML5VideoViewProxy.java
parentb25de0558c4e5440982db53a220943a899390c90 (diff)
downloadframeworks_base-ff19d19e016f67edf0a4e8eea374d144dc5129ef.zip
frameworks_base-ff19d19e016f67edf0a4e8eea374d144dc5129ef.tar.gz
frameworks_base-ff19d19e016f67edf0a4e8eea374d144dc5129ef.tar.bz2
Maintain the seek position in HTML5 video
Receive the current seek position from native when we start playing a video. That way is we are returning from pause we correctly continue where we left off. Requires and external/webkit change. (I6001f45a362f491e9040c8b52260d0a08fb8504f) Bug:3303721 Change-Id: I6b92289d4ef36bba1e0429327917533a4101655d
Diffstat (limited to 'core/java/android/webkit/HTML5VideoViewProxy.java')
-rw-r--r--core/java/android/webkit/HTML5VideoViewProxy.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/java/android/webkit/HTML5VideoViewProxy.java b/core/java/android/webkit/HTML5VideoViewProxy.java
index 85bff4f..d8f34e0 100644
--- a/core/java/android/webkit/HTML5VideoViewProxy.java
+++ b/core/java/android/webkit/HTML5VideoViewProxy.java
@@ -495,6 +495,7 @@ class HTML5VideoViewProxy extends Handler
break;
}
case ENDED:
+ mSeekPosition = 0;
nativeOnEnded(mNativePointer);
break;
case PAUSED:
@@ -538,10 +539,15 @@ class HTML5VideoViewProxy extends Handler
* Play a video stream.
* @param url is the URL of the video stream.
*/
- public void play(String url) {
+ public void play(String url, int position) {
if (url == null) {
return;
}
+
+ if (position > 0) {
+ seek(position);
+ }
+
Message message = obtainMessage(PLAY);
message.obj = url;
sendMessage(message);