Webview 将Web视图压缩到页面的特定部分

Webview 将Web视图压缩到页面的特定部分,webview,youtube,react-native,Webview,Youtube,React Native,我试图压缩youtube URL的网络视图,以便只显示视频(而不是youtube页面的其余部分)。你是怎么做到的?我已经了解了webview的一些道具,但希望对以下道具有更深入的了解: automaticallyAdjustContentInsets bool contentInset {top: number, left: number, bottom: number, right: number} 以下是我到目前为止的情况: 当然,我不想看到youtube搜索选项卡,我想改变web

我试图压缩youtube URL的网络视图,以便只显示视频(而不是youtube页面的其余部分)。你是怎么做到的?我已经了解了webview的一些道具,但希望对以下道具有更深入的了解:

automaticallyAdjustContentInsets bool 

contentInset {top: number, left: number, bottom: number, right: number} 
以下是我到目前为止的情况:

当然,我不想看到youtube搜索选项卡,我想改变webview的维度来实现这一点。如何才能更好地做到这一点?以下是每个视频“卡”的自定义组件的代码:

<TouchableHighlight 
          style={styles.touchCard}
          underlayColor={'transparent'}
          onPress={this.props.onPress} >
           <View style={styles.card}>
            <WebView
                scrollEnabled={false}
                style={styles.videoPreview}
                url={this.props.source}
                renderLoading={this.renderLoading}
                renderError={this.renderError}
                automaticallyAdjustContentInsets={false} />
              <View style={[styles.container, this.border('organge')]}>
                  <View style={[styles.header, this.border('blue')]}>
                      <Text style={[styles.previewText]}>{this.props.text}</Text>
                  </View>
                  <View style={[styles.footer, this.border('white')]}>
                    <View style={styles.sourceRow}>
                      <View style={[this.border('white')]}>
                        <ImageButton
                            style={[styles.logoBtn, , this.border('red'), styles.row]}
                            resizeMode={'contain'}
                            onPress={this.onHeartPress}
                            source={this.props.src} />
                      </View>
                      <View style={[this.border('white')]}>
                          <Text style={[styles.rowText, {fontWeight: 'bold'}]}>{this.props.entryBrand}</Text>
                          <Text style={[styles.rowText]}>{this.props.postTime}</Text>
                      </View>
                    </View>
                    <View style={[styles.heartRow, this.border('black')]}>
                      <KeywordBox 
                          style={[styles.category, this.border('blue')]}
                          key={this.props.key} 
                          text={this.props.category} 
                          onPress={this.props.categoryPress}
                          selected={this.props.selected} />
                    </View>
                  </View>
              </View>
            </View>
        </TouchableHighlight>

{this.props.text}
{this.props.entryBrand}
{this.props.postTime}