opentok / opentok-react-native

OpenTok React Native - a library for OpenTok iOS and Android SDKs
https://tokbox.com/
MIT License
210 stars 155 forks source link

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 #435

Open HarshitPadalia opened 4 years ago

HarshitPadalia commented 4 years ago

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

pietgk commented 12 months ago

any status update on this?

beHaze commented 2 months ago

We have released 2.27.6 (2.28.0 coming this week) please try with these versions. Reach out to Vonage support (https://api.support.vonage.com/hc/en-us) if you’re still facing issues.