halfway through implementing timestamps:
* still need to use the start position value stored in the PlayVideoActivity's Intent bundle, to set the VideoView using seekTo()
* need to test timestamp extraction regex, and possibly move it somewhere else
*need to find a better way to get the startPosition value to ActionBarHandler, which I thought used VideoInfo objects, but apparently doesn't
* currently there is a small setStartPosition() method
This commit is contained in:
parent
b65263349e
commit
b0182ed604
4 changed files with 28 additions and 2 deletions
|
|
@ -48,6 +48,7 @@ public class ActionBarHandler {
|
|||
private String videoTitle = "";
|
||||
|
||||
SharedPreferences defaultPreferences = null;
|
||||
private int startPosition;
|
||||
|
||||
class FormatItemSelectListener implements ActionBar.OnNavigationListener {
|
||||
@Override
|
||||
|
|
@ -216,12 +217,18 @@ public class ActionBarHandler {
|
|||
intent.putExtra(PlayVideoActivity.VIDEO_TITLE, videoTitle);
|
||||
intent.putExtra(PlayVideoActivity.STREAM_URL, videoStreams[selectedStream].url);
|
||||
intent.putExtra(PlayVideoActivity.VIDEO_URL, websiteUrl);
|
||||
activity.startActivity(intent);
|
||||
intent.putExtra(PlayVideoActivity.START_POSITION, startPosition);
|
||||
activity.startActivity(intent); //also HERE !!!
|
||||
}
|
||||
}
|
||||
// --------------------------------------------
|
||||
}
|
||||
|
||||
public void setStartPosition(int startPositionSeconds)
|
||||
{
|
||||
this.startPosition = startPositionSeconds;
|
||||
}
|
||||
|
||||
public void downloadVideo() {
|
||||
if(!videoTitle.isEmpty()) {
|
||||
String videoSuffix = "." + MediaFormat.getSuffixById(videoStreams[selectedStream].format);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue