2016-07-28 5 views
0

私はRTCViewでビデオを使用しています。別のビデオに1つの小さなビデオを表示したいと思います。しかし、私のRTCViewは互いに重なっていません。以下の私のコードリアクションネイティブ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は、私は、問題の問題はselfviewとremoteviewが作成された順序で、私は自分の上にそれらを置くために最初のリモートビューを作成していた解決した

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' 
}, 
+0

現在、どのように表示されているかのスクリーンショットを投稿していますか? –

答えて

0

をare-されますビュー。

ありがとうございました!

関連する問題