public int getVideoWidth() {
        if(mCurrentState.ordinal() >= State.RELEASING.ordinal()) {
            mCurrentState = State.ERROR;
            throw new IllegalStateException();
        }

        return mVideoFormat != null ? (int)(mVideoFormat.getInteger(MediaFormat.KEY_HEIGHT)
                * mVideoFormat.getFloat(MediaExtractor.MEDIA_FORMAT_EXTENSION_KEY_DAR)) : 0;
    }
@see android.media.MediaPlayer#setScreenOnWhilePlaying(boolean)
MediaPlayer/src/main/java/net/protyposis/android/mediaplayer/MediaPlayer.java