React Native - 有什么方法可以在 React Native 应用程序上使用 vimeo 视频播放器吗?

React Native - Is there any way to use vimeo video player on react native app?

我使用 this package 作为 vimeo 视频播放器。但出现以下错误。 有没有其他方法可以在 React Native 应用程序上使用 vimeo 播放器?

Invariant Violation: Invariant Violation: requireNativeComponent: "RCTWebViewBridge" was not found in the UIManager.

我已使用此代码:

// NOTE: Injecting code here due to react-native webview issues when overriding
// the onMessage method. See here: https://github.com/facebook/react-native/issues/10865
export const injectedCode = `
(function() {
var originalPostMessage = window.postMessage;
var patchedPostMessage = function(message, targetOrigin, transfer) {
  originalPostMessage(message, targetOrigin, transfer);
};
patchedPostMessage.toString = function() {
  return String(Object.hasOwnProperty).replace('hasOwnProperty', 'postMessage');
};
window.postMessage = patchedPostMessage;
})();
`;


   getVimeoPageURL(videoId) {
        return 'https://myagi.github.io/react-native-vimeo/v0.3.0.html?vid=' + videoId;
    }

render() {
        return (
            <WebView
                ref="webviewBridge"
                style={{
                    // Accounts for player border
                    marginTop: -8,
                    marginLeft: -10,
                    height: this.props.height
                }}
                injectedJavaScript={injectedCode}
                source={{ uri: this.getVimeoPageURL(this.props.videoId) }}
                scalesPageToFit={this.props.scalesPageToFit}
                scrollEnabled={false}
                onMessage={this.onBridgeMessage}
                onError={error => console.error(error)}
            />
        );
    }