无法在viro包中截图

问题描述 投票:0回答:1

我正在尝试在 viro 包中截取屏幕截图 https://github.com/virocommunity/viro 但我收到以下错误。

onButtonTap = async () => {
    if (!this.state.writeAccessPermission) {
      this.requestWriteAccessPermission();
    }
    try {
      await this.ARSceneNav.sceneNavigator.takeScreenshot('kartvya', true).then(result => {
          console.log(result.url, 'urlurlurlurlurl');
          console.log(result.success, 'successsuccesssuccesssuccesssuccess');
          console.log(result.errorCode, 'errorCodeerrorCodeerrorCodeerrorCode');
        });
    } catch (error) {
      console.log(error, 'errorerrorerrorerrorerror');
    }
  };

<TouchableOpacity
    style={{justifyContent: 'center'}}
    onPress={this.onButtonTap}>
    <Text>Capture</Text>
</TouchableOpacity> ```

android react-native screenshot
1个回答
0
投票

面对这个问题,最终使用了react-native-view-shot。但也有问题,无法捕捉 3D。

© www.soinside.com 2019 - 2024. All rights reserved.