ref(Thumbnail): Create React component.

This commit is contained in:
Hristo Terezov
2020-11-09 14:59:13 -06:00
parent d8dd644f38
commit 51e381a0b1
16 changed files with 996 additions and 889 deletions

View File

@@ -77,11 +77,6 @@ type Props = {
*/
initialVolumeValue: number,
/**
* Callback to invoke when the popover has been displayed.
*/
onMenuDisplay: Function,
/**
* Callback to invoke when changing the level of the participant's
* audio element.
@@ -111,19 +106,6 @@ class RemoteVideoMenuTriggerButton extends Component<Props> {
*/
_rootElement = null;
/**
* Initializes a new {#@code RemoteVideoMenuTriggerButton} instance.
*
* @param {Object} props - The read-only properties with which the new
* instance is to be initialized.
*/
constructor(props: Object) {
super(props);
// Bind event handler so it is only bound once for every instance.
this._onShowRemoteMenu = this._onShowRemoteMenu.bind(this);
}
/**
* Implements React's {@link Component#render()}.
*
@@ -140,7 +122,6 @@ class RemoteVideoMenuTriggerButton extends Component<Props> {
return (
<Popover
content = { content }
onPopoverOpen = { this._onShowRemoteMenu }
position = { this.props._menuPosition }>
<span
className = 'popover-trigger remote-video-menu-trigger'>
@@ -153,18 +134,6 @@ class RemoteVideoMenuTriggerButton extends Component<Props> {
);
}
_onShowRemoteMenu: () => void;
/**
* Opens the {@code RemoteVideoMenu}.
*
* @private
* @returns {void}
*/
_onShowRemoteMenu() {
this.props.onMenuDisplay();
}
/**
* Creates a new {@code RemoteVideoMenu} with buttons for interacting with
* the remote participant.