video test removed
This commit is contained in:
parent
6a7b5843ff
commit
868896b6c9
3 changed files with 7 additions and 30 deletions
|
@ -107,12 +107,13 @@ public class MainActivity extends AppCompatActivity {
|
|||
}));
|
||||
|
||||
//This is to launch video playback test
|
||||
Button videotest = (Button)findViewById(R.id.vtest);
|
||||
videotest.setOnClickListener(new View.OnClickListener(){
|
||||
Button addaccount = (Button)findViewById(R.id.addaccount);
|
||||
addaccount.setOnClickListener(new View.OnClickListener(){
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
System.out.println("This is not implemented yet");
|
||||
//buttonaction
|
||||
s3test();
|
||||
//s3test();
|
||||
//videoplayer("https://video.asgardius.company/download/videos/41780585-a935-4d53-84c8-45ce97141231-480.mp4");
|
||||
}
|
||||
});
|
||||
|
@ -129,29 +130,6 @@ public class MainActivity extends AppCompatActivity {
|
|||
});
|
||||
}
|
||||
|
||||
private void s3test() {
|
||||
|
||||
Region region = Region.getRegion(US_EAST_1);
|
||||
S3ClientOptions s3ClientOptions = S3ClientOptions.builder().build();
|
||||
s3ClientOptions.setPathStyleAccess(true);
|
||||
AWSCredentials myCredentials = new BasicAWSCredentials(username, password);
|
||||
AmazonS3 s3client = new AmazonS3Client(myCredentials, region);
|
||||
s3client.setEndpoint(endpoint);
|
||||
s3client.setS3ClientOptions(s3ClientOptions);
|
||||
//s3client.setRegion(getRegion("asteroid"));
|
||||
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(getResources().getString(R.string.bucketname), getResources().getString(R.string.objectname));
|
||||
URL objectURL = s3client.generatePresignedUrl(request);
|
||||
videoplayer(objectURL.toString());
|
||||
|
||||
}
|
||||
|
||||
private void videoplayer(String url) {
|
||||
|
||||
Intent intent = new Intent(this, VideoPlayer.class);
|
||||
intent.putExtra("video_url", url);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
private void explorer() {
|
||||
|
||||
Intent intent = new Intent(this, BucketSelect.class);
|
||||
|
|
|
@ -26,11 +26,11 @@
|
|||
tools:layout_editor_absoluteX="20dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/vtest"
|
||||
android:id="@+id/addaccount"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/video_test_button"
|
||||
android:text="@string/accountadd_button"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<Button
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
<string name="endpoint_url">https://object.asgardius.company</string>
|
||||
<string name="access_key">asgardius</string>
|
||||
<string name="secret_key">DTMp5kftamr49Ke7</string>
|
||||
<string name="bucketname">asgardiustest</string>
|
||||
<string name="objectname">peces felices.mp4</string>
|
||||
<string name="accountselect">Please choose an account</string>
|
||||
<string name="accountadd_button">Add Account</string>
|
||||
<string name="explorer_test_button">File Explorer Test</string>
|
||||
<string name="video_test_button">Video Test</string>
|
||||
<string name="media_conn_fail">Cannot retrieve media file</string>
|
||||
|
|
Loading…
Reference in a new issue