video test removed

This commit is contained in:
Page Asgardius 2022-09-04 11:16:38 -07:00
parent 6a7b5843ff
commit 868896b6c9
3 changed files with 7 additions and 30 deletions

View file

@ -107,12 +107,13 @@ public class MainActivity extends AppCompatActivity {
})); }));
//This is to launch video playback test //This is to launch video playback test
Button videotest = (Button)findViewById(R.id.vtest); Button addaccount = (Button)findViewById(R.id.addaccount);
videotest.setOnClickListener(new View.OnClickListener(){ addaccount.setOnClickListener(new View.OnClickListener(){
@Override @Override
public void onClick(View view) { public void onClick(View view) {
System.out.println("This is not implemented yet");
//buttonaction //buttonaction
s3test(); //s3test();
//videoplayer("https://video.asgardius.company/download/videos/41780585-a935-4d53-84c8-45ce97141231-480.mp4"); //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() { private void explorer() {
Intent intent = new Intent(this, BucketSelect.class); Intent intent = new Intent(this, BucketSelect.class);

View file

@ -26,11 +26,11 @@
tools:layout_editor_absoluteX="20dp"> tools:layout_editor_absoluteX="20dp">
<Button <Button
android:id="@+id/vtest" android:id="@+id/addaccount"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/video_test_button" android:text="@string/accountadd_button"
tools:ignore="MissingConstraints" /> tools:ignore="MissingConstraints" />
<Button <Button

View file

@ -5,9 +5,8 @@
<string name="endpoint_url">https://object.asgardius.company</string> <string name="endpoint_url">https://object.asgardius.company</string>
<string name="access_key">asgardius</string> <string name="access_key">asgardius</string>
<string name="secret_key">DTMp5kftamr49Ke7</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="accountselect">Please choose an account</string>
<string name="accountadd_button">Add Account</string>
<string name="explorer_test_button">File Explorer Test</string> <string name="explorer_test_button">File Explorer Test</string>
<string name="video_test_button">Video Test</string> <string name="video_test_button">Video Test</string>
<string name="media_conn_fail">Cannot retrieve media file</string> <string name="media_conn_fail">Cannot retrieve media file</string>