0
我在RTCView中使用视频,我想通过另一个视频显示一个小视频。但是我的RTCView并没有相互重叠。下面是我的代码React-Native RTC视图重叠
<RTCView streamURL={this.state.selfViewSrc} style={styles.selfView}/>
{
mapHash(this.state.remoteList, function(remote, index) {
return <RTCView key={index} streamURL={remote} style= {styles.remoteView}/>
})
}
CSS为─
const styles = StyleSheet.create({
selfView: {
width: width,
height: (Platform.OS === 'ios') ? height-80 : height/2+100,
alignSelf: 'center',
zIndex: 0,
},
remoteView: {
position: 'absolute',
zIndex: 2,
marginTop: (Platform.OS === 'ios') ? -120 : 0,
width: 120,
height: 120,
left: 0,
borderWidth: .5,
alignSelf: 'flex-start'
},
记住张贴它目前的样子的截图? –