projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Video embedded mantains its playback state when the device is turned to other orientation
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
ui
/
preview
/
PreviewMediaFragment.java
diff --git
a/src/com/owncloud/android/ui/preview/PreviewMediaFragment.java
b/src/com/owncloud/android/ui/preview/PreviewMediaFragment.java
index
6fbf7d6
..
9815e8b
100644
(file)
--- a/
src/com/owncloud/android/ui/preview/PreviewMediaFragment.java
+++ b/
src/com/owncloud/android/ui/preview/PreviewMediaFragment.java
@@
-120,12
+120,12
@@
public class PreviewMediaFragment extends SherlockFragment implements
* @param fileToDetail An {@link OCFile} to preview in the fragment
* @param ocAccount An ownCloud account; needed to start downloads
*/
* @param fileToDetail An {@link OCFile} to preview in the fragment
* @param ocAccount An ownCloud account; needed to start downloads
*/
- public PreviewMediaFragment(OCFile fileToDetail, Account ocAccount) {
+ public PreviewMediaFragment(OCFile fileToDetail, Account ocAccount
, int startPlaybackPosition, boolean autoplay
) {
mFile = fileToDetail;
mAccount = ocAccount;
mFile = fileToDetail;
mAccount = ocAccount;
- mSavedPlaybackPosition =
0
;
+ mSavedPlaybackPosition =
startPlaybackPosition
;
mStorageManager = null; // we need a context to init this; the container activity is not available yet at this moment
mStorageManager = null; // we need a context to init this; the container activity is not available yet at this moment
- mAutoplay =
true
;
+ mAutoplay =
autoplay
;
}
}
@@
-282,6
+282,7
@@
public class PreviewMediaFragment extends SherlockFragment implements
toHide.add(R.id.action_cancel_download);
toHide.add(R.id.action_cancel_upload);
toHide.add(R.id.action_download_file);
toHide.add(R.id.action_cancel_download);
toHide.add(R.id.action_cancel_upload);
toHide.add(R.id.action_download_file);
+ toHide.add(R.id.action_sync_file);
toHide.add(R.id.action_rename_file); // by now
for (int i : toHide) {
toHide.add(R.id.action_rename_file); // by now
for (int i : toHide) {
@@
-751,5
+752,16
@@
public class PreviewMediaFragment extends SherlockFragment implements
container.finish();
}
}
container.finish();
}
}
+
+
+ public int getPosition() {
+ mSavedPlaybackPosition = mVideoPreview.getCurrentPosition();
+ return mSavedPlaybackPosition;
+ }
+
+ public boolean isPlaying() {
+ mAutoplay = mVideoPreview.isPlaying();
+ return mAutoplay;
+ }
}
}