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'
},
記住張貼它目前的樣子的截圖? –