diff --git a/app/src/main/java/asgardius/page/s3manager/MainActivity.java b/app/src/main/java/asgardius/page/s3manager/MainActivity.java index 38a609b..e6994fe 100644 --- a/app/src/main/java/asgardius/page/s3manager/MainActivity.java +++ b/app/src/main/java/asgardius/page/s3manager/MainActivity.java @@ -19,15 +19,15 @@ public class MainActivity extends AppCompatActivity { @Override public void onClick(View view) { //buttonaction - videoplayer(); + videoplayer("https://video.asgardius.company/download/videos/41780585-a935-4d53-84c8-45ce97141231-480.mp4"); } }); } - private void videoplayer() { + private void videoplayer(String url) { Intent intent = new Intent(this, VideoPlayer.class); - + intent.putExtra("video_url", url); startActivity(intent); } diff --git a/app/src/main/java/asgardius/page/s3manager/VideoPlayer.java b/app/src/main/java/asgardius/page/s3manager/VideoPlayer.java index a835f8c..8879125 100644 --- a/app/src/main/java/asgardius/page/s3manager/VideoPlayer.java +++ b/app/src/main/java/asgardius/page/s3manager/VideoPlayer.java @@ -24,7 +24,7 @@ public class VideoPlayer extends AppCompatActivity { // url of video which we are loading. - String videoURL = "https://video.asgardius.company/download/videos/41780585-a935-4d53-84c8-45ce97141231-480.mp4"; + //String videoURL = "https://video.asgardius.company/download/videos/41780585-a935-4d53-84c8-45ce97141231-480.mp4"; ExoPlayer player; @@ -32,6 +32,8 @@ public class VideoPlayer extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_video_player); + //Get media url + String videoURL = getIntent().getStringExtra("video_url"); playerView = findViewById(R.id.player_view); // creating a variable for exoplayer player = new ExoPlayer.Builder(this).build();