From e1d167003fc4cb99d199154379ba042db7ef22a5 Mon Sep 17 00:00:00 2001 From: "vyacheslav.kanivets" Date: Wed, 9 May 2018 11:40:31 +0300 Subject: [PATCH 1/2] allow to override media controller --- .../java/tcking/github/com/giraffeplayer2/VideoView.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/giraffeplayer2/src/main/java/tcking/github/com/giraffeplayer2/VideoView.java b/giraffeplayer2/src/main/java/tcking/github/com/giraffeplayer2/VideoView.java index b2b75b7..b91ef06 100644 --- a/giraffeplayer2/src/main/java/tcking/github/com/giraffeplayer2/VideoView.java +++ b/giraffeplayer2/src/main/java/tcking/github/com/giraffeplayer2/VideoView.java @@ -86,10 +86,15 @@ private void init(Context context) { private void initMediaController() { - mediaController = new DefaultMediaController(getContext()); + mediaController = createMediaController(); mediaController.bind(this); } + @NonNull + protected DefaultMediaController createMediaController() { + return new DefaultMediaController(getContext()); + } + public VideoView setFingerprint(Object fingerprint) { videoInfo.setFingerprint(fingerprint); From e03fe706c167dc0231e71df5219a0266873d7a5b Mon Sep 17 00:00:00 2001 From: "vyacheslav.kanivets" Date: Wed, 9 May 2018 11:40:31 +0300 Subject: [PATCH 2/2] allow to override media controller --- .../main/java/tcking/github/com/giraffeplayer2/VideoView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/giraffeplayer2/src/main/java/tcking/github/com/giraffeplayer2/VideoView.java b/giraffeplayer2/src/main/java/tcking/github/com/giraffeplayer2/VideoView.java index b91ef06..a206ed0 100644 --- a/giraffeplayer2/src/main/java/tcking/github/com/giraffeplayer2/VideoView.java +++ b/giraffeplayer2/src/main/java/tcking/github/com/giraffeplayer2/VideoView.java @@ -91,7 +91,7 @@ private void initMediaController() { } @NonNull - protected DefaultMediaController createMediaController() { + protected MediaController createMediaController() { return new DefaultMediaController(getContext()); }