From 1e7e8d4121adb3f6af37bf6e6f537609eea72ef1 Mon Sep 17 00:00:00 2001 From: Mauricio Colli Date: Tue, 31 Dec 2019 02:51:32 -0300 Subject: [PATCH] Fix for player access out of its creation thread --- .../org/schabi/newpipe/player/playback/MediaSourceManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java b/app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java index 85c852f57..e4cef8c5c 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java +++ b/app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java @@ -319,6 +319,7 @@ public class MediaSourceManager { private Observable getEdgeIntervalSignal() { return Observable.interval(progressUpdateIntervalMillis, TimeUnit.MILLISECONDS) + .observeOn(AndroidSchedulers.mainThread()) .filter(ignored -> playbackListener.isApproachingPlaybackEdge(playbackNearEndGapMillis)); }