Unverified Commit 3a1d8193 authored by Hampton Maxwell's avatar Hampton Maxwell Committed by GitHub
Browse files

Allow screen to sleep when video finishes

parent bd48a001
Loading
Loading
Loading
Loading
+3 −1
Changes for android/src/main/java/com/brentvatne/react/ReactVideoView.java: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -624,9 +624,11 @@ public class ReactVideoView extends ScalableVideoView implements MediaPlayer.OnP

    @Override
    public void onCompletion(MediaPlayer mp) {

        isCompleted = true;
        mEventEmitter.receiveEvent(getId(), Events.EVENT_END.toString(), null);
        if (!mRepeat) {
            setKeepScreenOn(false);
        }
    }

    @Override