示例#1
0
  private void setupExoPlayer() {
    audioCapabilitiesReceiver =
        new AudioCapabilitiesReceiver(getContext().getApplicationContext(), this);
    audioCapabilitiesReceiver.register();
    emExoPlayer = new EMExoPlayer(null);

    // Sets the internal listener
    listenerMux = new EMListenerMux(new MuxNotifier());
    emExoPlayer.addListener(listenerMux);
    emExoPlayer.setMetadataListener(null);
    emExoPlayer.setSurface(exoVideoSurfaceView.getHolder().getSurface());
    exoVideoSurfaceView.getHolder().addCallback(new EMExoVideoSurfaceCallback());
  }
示例#2
0
  @Override
  public void setOnTouchListener(OnTouchListener listener) {
    if (exoVideoSurfaceView != null) {
      exoVideoSurfaceView.setOnTouchListener(listener);
    }

    if (videoView != null) {
      videoView.setOnTouchListener(listener);
    }

    // Sets the onTouch listener for the shutters
    shutterLeft.setOnTouchListener(listener);
    shutterRight.setOnTouchListener(listener);
    shutterTop.setOnTouchListener(listener);
    shutterBottom.setOnTouchListener(listener);

    super.setOnTouchListener(listener);
  }