opentok-react-native icon indicating copy to clipboard operation
opentok-react-native copied to clipboard

when I change audio from publisher side then stream property changed method called which proper but when I change video from publisher side then stream destroyed called

Open HarshitPadalia opened this issue 4 years ago • 1 comments

I have found 1 issue is that when I change audio from publisher side then stream property changed method called which proper but when I change video from publisher side then stream destroyed called and in this method data is showing has video property to true can you check my implementation?

<ImageBackground
          resizeMode="cover"
          source={image}
          style={{
            flex: 1,
            justifyContent: 'center',
            width: Dimensions.get('window').width,
            height: Dimensions.get('window').height * 0.7,
          }}>
          <View style={{ flex: 1, flexDirection: 'row' }}>
            {this.props.isFocused && (
              <OTSession
                apiKey={constant.default.apiKey}
                sessionId={constant.default.sessionId}
                token={constant.default.apiToken} 
               signal={this.state.signal}
                eventHandlers={this.sessionEventHandlers}
                ref={instance => {
                  this.session = instance;
                }}
                audioTrack={true}
                videoTrack={true}>

                <OTSubscriber
                  properties={{
                    subscribeToVideo: true,
                    subscribeToAudio: true,
                  }}
                  style={{
                    width: Dimensions.get('window').width,
                    height:  this.state.VideoSession
                        ? 700
                        : 0,
                    zIndex: this.state.VideoSession ? 0 : -1,
                  }}
                />
                <OTPublisher
                  style={{
    
                    width:  100,
                    height:120,
                    position: 'absolute',
                    top:  30,
                    right:  30,
                    zIndex:  10,
                  }}
                  properties={{
                    publishVideo: this.state.isVideoOn,
                    publishAudio: !this.state.isMuteCall,
                    name: '',
                    showControls: true,
                    cameraPosition: this.state.cameraPosition,
                  }}
                />
                {/* )} */}
              </OTSession>
            )}
            <KeepAwake />
          </View>
        </ImageBackground>

this code I have used at both publisher and subscriber side if anything incorrect then tell me thanks in advance

HarshitPadalia avatar Jul 22 '20 06:07 HarshitPadalia

any status update on this?

pietgk avatar Sep 18 '23 15:09 pietgk