Player_Flutter icon indicating copy to clipboard operation
Player_Flutter copied to clipboard

android 直播不支持画中画

Open whichname opened this issue 1 year ago • 0 comments

文档中写的是 ios 直播不支持,现在是 android 、 ios 都不支持。

文档

txliveplayer_controller.dart

  @override
  Future<int> enterPictureInPictureMode(
      {String? backIconForAndroid,
      String? playIconForAndroid,
      String? pauseIconForAndroid,
      String? forwardIconForAndroid}) async {
    /// live not support
    return -1;
  }

但实际 FTXLivePlayer.java 中是有相关代码的:

    public IntMsg enterPictureInPictureMode(@NonNull PipParamsPlayerMsg pipParamsMsg) {
        mPipManager.addCallback(getPlayerId(), pipCallback);
        mPipParams = new FTXPIPManager.PipParams(
                mPipManager.toAndroidPath(pipParamsMsg.getBackIconForAndroid()),
                mPipManager.toAndroidPath(pipParamsMsg.getPlayIconForAndroid()),
                mPipManager.toAndroidPath(pipParamsMsg.getPauseIconForAndroid()),
                mPipManager.toAndroidPath(pipParamsMsg.getForwardIconForAndroid()),
                getPlayerId(), false, false, true);
        mPipParams.setIsPlaying(isPlayerPlaying());
        int pipResult = mPipManager.enterPip(mPipParams, mVideoModel);
        // After the startup is successful, pause the video on the current interface.
        if (pipResult == FTXEvent.NO_ERROR) {
            pausePlayer();
        }
        return TXCommonUtil.intMsgWith((long) pipResult);
    }

whichname avatar May 24 '24 07:05 whichname