Giter Club home page Giter Club logo

Comments (3)

giladna avatar giladna commented on July 28, 2024

@janbolat I'v opend internal ticket for this FEM-2669

please follow our release when this is added

from playkit-android.

janbolat avatar janbolat commented on July 28, 2024

@giladna any news on this?

from playkit-android.

giladna avatar giladna commented on July 28, 2024

@janbolat

After looking at it,
Seems that all you have to do is to add this listener on Application level and handle what ever you need
In addition you have the life cycle events to decide if player is visible or not
unless you do it your self and then you know what is the state.

implement -> PlayerControlView.VisibilityListener
  playerFrameLayout = findViewById(R.id.player_view);
            playerFrameLayout.setControllerVisibilityListener(this);
            playerFrameLayout.setErrorMessageProvider(new PlayerErrorMessageProvider());
            playerFrameLayout.requestFocus();
            playerFrameLayout.addView(player.getView());

  @Override
  public void onVisibilityChange(int visibility) {
    debugRootView.setVisibility(visibility);
  }
@Override
    public boolean dispatchKeyEvent(KeyEvent event) {
        log.d("dispatchKeyEvent");

        if (playerFrameLayout != null) {
            // See whether the player view wants to handle media or DPAD keys events.
            return playerFrameLayout.dispatchKeyEvent(event) || super.dispatchKeyEvent(event);
        }
        return false;
    }

could you explain your use case or share a sample app?

from playkit-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.