diff --git a/base/src/main/java/io/github/xwz/base/activities/VideoPlayerActivity.java b/base/src/main/java/io/github/xwz/base/activities/VideoPlayerActivity.java index 0703cce..5051077 100644 --- a/base/src/main/java/io/github/xwz/base/activities/VideoPlayerActivity.java +++ b/base/src/main/java/io/github/xwz/base/activities/VideoPlayerActivity.java @@ -17,7 +17,6 @@ import android.util.Log; import android.view.SurfaceHolder; import android.view.View; -import android.widget.MediaController; import android.widget.Toast; import com.google.android.exoplayer.ExoPlayer; @@ -100,6 +99,11 @@ public void onReceive(Context context, Intent intent) { if (ContentManagerBase.CONTENT_AUTH_ERROR.equals(action)) { authFailed(intent); } + if (ContentManagerBase.CONTENT_AUTH_FETCHING.equals(action)) { + if (videoPlayerView != null) { + videoPlayerView.showStatusText("Preparing..."); + } + } } }; @@ -193,6 +197,7 @@ public void onVisibleBehindCanceled() { private void registerReceiver() { Log.i(TAG, "Register receiver"); IntentFilter filter = new IntentFilter(); + filter.addAction(ContentManagerBase.CONTENT_AUTH_FETCHING); filter.addAction(ContentManagerBase.CONTENT_AUTH_START); filter.addAction(ContentManagerBase.CONTENT_AUTH_DONE); filter.addAction(ContentManagerBase.CONTENT_AUTH_ERROR); diff --git a/base/src/main/java/io/github/xwz/base/views/VideoPlayerView.java b/base/src/main/java/io/github/xwz/base/views/VideoPlayerView.java index 53414fb..9520f72 100644 --- a/base/src/main/java/io/github/xwz/base/views/VideoPlayerView.java +++ b/base/src/main/java/io/github/xwz/base/views/VideoPlayerView.java @@ -27,9 +27,9 @@ import java.util.Arrays; import java.util.List; +import io.github.xwz.base.R; import io.github.xwz.base.api.EpisodeBaseModel; import io.github.xwz.base.player.VideoPlayer; -import io.github.xwz.base.R; public class VideoPlayerView { private static final String TAG = "VideoPlayerView"; @@ -289,7 +289,7 @@ private void hideStatusText() { statusTextView.setVisibility(View.GONE); } - private void showStatusText(String text) { + public void showStatusText(String text) { statusTextView.setVisibility(View.VISIBLE); statusTextView.setText(text); }