aws-samples / amazon-ivs-realtime-web-demo-reactjs

This repository provides ReactJS code and a walkthrough to build a demo web app for multi-participant live streaming in a grid layout with latency <300ms. It demonstrates Amazon IVS Web Broadcasting SDK integration for real-time streaming.
MIT No Attribution
11 stars 7 forks source link

Property 'localParticipant' is private and only accessible within class 'Stage'.ts #1

Open mattvick opened 9 months ago

mattvick commented 9 months ago

Many thanks for this helpful and clearly written demo repo! 💯🥇

When using Typescript I'm seeing the following error:

Property 'localParticipant' is private and only accessible within class 'Stage'.ts(2341)

localParticipant, which is a private member of Stage, is being accessed in hello-world/client/src/app/utils/mediaDevices.js on line 52.

https://github.com/aws-samples/amazon-ivs-realtime-web-demo-reactjs/blob/fc9d9ce8c029d977e2d641676a36befa848db9d9/hello-world/client/src/app/utils/mediaDevices.js#L52

src/stage/v2/stage.d.ts

/**
 * A class impementing the Stages SDK
 */
export declare class Stage extends TypedEmitter<StageEventMap> {
    // ...
    private localParticipant?;
    // ...
}

Is there a planned change to the amazon-ivs-web-broadcast API, or a suggested workaround?