Add voice broadcast pre-recoding PiP (#9548)
This commit is contained in:
parent
afdf289a78
commit
abec724387
26 changed files with 977 additions and 111 deletions
|
@ -19,6 +19,7 @@ import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
|||
|
||||
import { MatrixClientPeg as peg } from '../../src/MatrixClientPeg';
|
||||
import MatrixClientContext from "../../src/contexts/MatrixClientContext";
|
||||
import { SDKContext, SdkContextClass } from "../../src/contexts/SDKContext";
|
||||
|
||||
type WrapperProps<T> = { wrappedRef?: RefCallback<ComponentType<T>> } & T;
|
||||
|
||||
|
@ -39,3 +40,16 @@ export function wrapInMatrixClientContext<T>(WrappedComponent: ComponentType<T>)
|
|||
}
|
||||
return Wrapper;
|
||||
}
|
||||
|
||||
export function wrapInSdkContext<T>(
|
||||
WrappedComponent: ComponentType<T>,
|
||||
sdkContext: SdkContextClass,
|
||||
): ComponentType<WrapperProps<T>> {
|
||||
return class extends React.Component<WrapperProps<T>> {
|
||||
render() {
|
||||
return <SDKContext.Provider value={sdkContext}>
|
||||
<WrappedComponent {...this.props} />
|
||||
</SDKContext.Provider>;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue