React Native Video Poster在iOS中不起作用

时间:2020-11-05 18:34:26

标签: react-native react-native-ios

我正在尝试在react-native-video库中添加海报图像。在android中,它工作正常,但在iOS海报中,图像显示1-2秒,然后消失了。

我的本​​机版本是0.63.3。

下面是我的代码。

        <Video
          style={this.props.styles.video}
          source={{
            uri: !this.state.isEnabled
              ? this.props.url
              : this.props.caption_url,
          }}
          // Can be a URL or a local file.
          ref={(ref) => {
            this.player = ref;
          }}
          poster={this.props.poster}
          paused={this.state.paused}
          muted={this.state.muted}
          controls={this.props.controls}
          resizeMode={'cover'}
          // resizeMode={'stretch'}
          fullscreen={true}
          onLoad={this.handleLoad}
          onProgress={this.handleProgress}
          onEnd={this.handleEnd}
          fullscreen={this.state.fullscreen}
          onError={(error) => {
            console.log(error, 'THIS IS ERROR');
          }}
        />

0 个答案:

没有答案