diff --git a/README.md b/README.md index 0a9bf76..5d62151 100644 --- a/README.md +++ b/README.md @@ -32,19 +32,13 @@ dependencies { } ``` -
- -### Step 2 -> Add this file code without changing its name to your project Link: -[exo_control_view](https://github.com/A0ks9/EnhancedPlayerView/blob/main/app/src/main/res/layout/exo_control_view.xml) -
-### Step 3 +### Step 2 > Add this widget to your `xml` activity file ```xml -### Step 4 +### Step 3 > add ExoPlayer to your project and use it normally
-### Step 5 -> If you want to cache the video, so it doesn't download every time the user opens the app. Then add this to the EnhancedPlayerView view -```java -binding.playerView.initializeDatabaseProvider(); -binding.playerView.initializeActivityResult(getActivityResultRegistry()); -``` - -
- -### Step 6 -> **Important:** You should add this code at the beginning Of onCreate -```java -binding.playerView.initializeViews(getResources(), getPackageName()); -``` - -
- -### Step 7 +### Step 4 > After adding ExoPlayer to the project and intializing it then use it with the EnhancedPlayerView like this ```java binding.playerView.setPlayer(player); @@ -99,17 +76,21 @@ player.prepare();
-### Step 8 +### Step 5 > Add this Code in onResume of your Activity/Fragment ```java binding.playerView.onResumeActivity(); ``` +
+ > Add this code in onPause of your Activity/Fragment ```java binding.playerView.onPauseActivity(); ``` +
+ > Add this code in onDestory of your Activity/Fragment ```java binding.playerView.onDestroyActivity(); @@ -122,6 +103,28 @@ if (player != null) {
### OPTIONAL +> If you want to hide UserID text that moves on the screen then use this in `xml` +```xml +app:show_floating_text="false" +``` + +
+ +> If you want to hide Close Image then use this in `xml` +```xml +app:show_close="false" +``` + +
+ +> If you want to cache the video, so it doesn't download every time the user opens the app. Then add this to the EnhancedPlayerView view +```java +binding.playerView.initializeDatabaseProvider(); +binding.playerView.initializeActivityResult(getActivityResultRegistry()); +``` + +
+ > If you are looking for video orientation based on phone orientation then Add this code in your Activity/Fragment ```java @Override @@ -133,7 +136,6 @@ public void onConfigurationChanged(@NonNull Configuration newConfig) {
-### OPTIONAL > If tou are looking for PIP for the video then Add this code in your Activity/Fragment ```java @Override