GithubHelp home page GithubHelp logo

OTPublisher remount issue about opentok-react HOT 9 OPEN

opentok avatar opentok commented on July 29, 2024
OTPublisher remount issue

from opentok-react.

Comments (9)

ramiel avatar ramiel commented on July 29, 2024

I have the same error, even with a different setup but problably always linked to unmounting the component

from opentok-react.

enricop89 avatar enricop89 commented on July 29, 2024

@ber8749 is this still reproducible? I am not able too follow your code.

@ramiel Can you post some code to reproduce the issue please?

cheers

from opentok-react.

ramiel avatar ramiel commented on July 29, 2024

I changed the implementation and I have not the error anymore. If I'm able to reproduce it again I'll post some code here

from opentok-react.

Ganesh-grandy avatar Ganesh-grandy commented on July 29, 2024

@ramiel
How did you change the implementation? I'm currently experiencing a similar issue where the user is not able to unpublish before disconnecting.

from opentok-react.

ttraenkler avatar ttraenkler commented on July 29, 2024

@Ganesh-grandy Tokbox support about two months back said the issue is specific to screen sharing with Chrome/Windows, hardware acceleration and high video resolutions but should be fixed with Chrome 82.

I was able to work around the issue setting maxResolution: { width: 1920, height: 1080 } for screen sharing which fixed the issue for me and my users at an acceptable tradeoff.

from opentok-react.

ber8749 avatar ber8749 commented on July 29, 2024

@enricop89 Yes, this is still a reproducible issue for me.

@ttraenkler Did Tokbox support address this issue publicly? If so, can you point me to the page where they addressed this issue?

from opentok-react.

ramiel avatar ramiel commented on July 29, 2024

@Ganesh-grandy the point is that I don't know what I changed to make it work. Also, I don't use this anymore, sorry

from opentok-react.

ttraenkler avatar ttraenkler commented on July 29, 2024

@ber8749 No, it's not public but has been a support request of mine. Have you tried maxResolution 1920x1080?

from opentok-react.

enricop89 avatar enricop89 commented on July 29, 2024

@ber8749 I tested the code and, to me, the error is in the implementation. You are mounting/unmounting the OTSession and OTPublisher component a lot of time for nothing. The showPublisher state variable is changed in the publisher events and also in the componentDidMount hook. What's the reason behind this behaviour?

You can achieve the result with this simple app:

import React from "react";
import ReactDOM from "react-dom";
import { OTSession, OTPublisher } from "opentok-react";

export default class App extends React.Component {
    state = {
        showPublisher: true
    };

    publisherEventHandlers = {
        accessAllowed: event => {
            console.log('accessAllowed called');
        },
        accessDialogOpened: event => {
            console.log('accessDialogOpened called');
        }
    };

    componentDidMount() {
        
    }

    render() {
        const { apiKey, sessionId, token } = this.props.credentials;
        return (
            <div className="App">
                <h1>OTPublisher Test</h1>
                {this.state.showPublisher ?
                    <OTSession
                        apiKey=""
                        sessionId=""
                        token=""
                    >
                        <OTPublisher
                            eventHandlers={this.publisherEventHandlers}
                        />
                    </OTSession>
                    :
                    <span>Please Grant the Browser Access to your Camera and Microphone</span>
                }
            </div>
        );
    }
}

from opentok-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.