GiraffePlayer icon indicating copy to clipboard operation
GiraffePlayer copied to clipboard

Giraffe player would play sound when screen is turned off

Open JanuszChmiel opened this issue 8 years ago • 1 comments

Dear specialists, how complex would be to modify Giraffe player and player, which this player use to support play sound when Android screen have been turned off. Would it be too complex? to re factor The code? Yours player is awesome. I can modify it to play my favourite even Internet radio stations. Program perfectly managed incoming phone calls. When phone call is active, live playback is being automatically stopped. And when phone call end, player automatically continue to play. I Am not advanced developer so I can not modify The source code myself. It is complex program. If it would be necessary to modify complex included C++ libraries to make my dream to come true, let Me know. I will have to give it up. I would like to hear sound when phone screen is turned off by using phone button. Because pphone board produces much more less heat. And battery can be used for more time. I would like to thank all engaged developers for perfectly prepared project. I can build it by using Gradle build system with no issues at all. Thank you very much for implementing my wish. With kindness regards. Janusz Chmiel visually impaired user who do not see at all.

JanuszChmiel avatar Apr 03 '17 15:04 JanuszChmiel

this player is focus on playing video and media control ui, if u want to play live radio,I suggest u to use ijkplayer directly and flow the steps: 1.player should started in a foreground service 2.add a listener to TelephonyManager:

TelephonyManager appContext = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
        appContext.listen(new PhoneStateListener(){
            @Override
            public void onCallStateChanged(int state, String incomingNumber) {
                switch (state) {
                            case TelephonyManager.CALL_STATE_OFFHOOK:
                            case TelephonyManager.CALL_STATE_RINGING:
                                //stop play when calling
                                break;
                            case TelephonyManager.CALL_STATE_IDLE:
                            default:
                                //start play
                                break;
                        }
            }
        }, PhoneStateListener.LISTEN_SERVICE_STATE);

tcking avatar Apr 17 '17 05:04 tcking