ref(thumbnail): pass in position of remote menu popover
This commit is contained in:
parent
467a5aaae3
commit
aaaa3e05d1
|
@ -163,6 +163,8 @@ RemoteVideo.prototype._generatePopupContent = function() {
|
||||||
const onVolumeChange = this._setAudioVolume;
|
const onVolumeChange = this._setAudioVolume;
|
||||||
const { isModerator } = APP.conference;
|
const { isModerator } = APP.conference;
|
||||||
const participantID = this.id;
|
const participantID = this.id;
|
||||||
|
const menuPosition = interfaceConfig.VERTICAL_FILMSTRIP
|
||||||
|
? 'left bottom' : 'top center';
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<Provider store = { APP.store }>
|
<Provider store = { APP.store }>
|
||||||
|
@ -172,6 +174,7 @@ RemoteVideo.prototype._generatePopupContent = function() {
|
||||||
initialVolumeValue = { initialVolumeValue }
|
initialVolumeValue = { initialVolumeValue }
|
||||||
isAudioMuted = { this.isAudioMuted }
|
isAudioMuted = { this.isAudioMuted }
|
||||||
isModerator = { isModerator }
|
isModerator = { isModerator }
|
||||||
|
menuPosition = { menuPosition }
|
||||||
onMenuDisplay
|
onMenuDisplay
|
||||||
= {this._onRemoteVideoMenuDisplay.bind(this)}
|
= {this._onRemoteVideoMenuDisplay.bind(this)}
|
||||||
onRemoteControlToggle = { onRemoteControlToggle }
|
onRemoteControlToggle = { onRemoteControlToggle }
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import { Popover } from '../../base/popover';
|
import { Popover } from '../../base/popover';
|
||||||
|
@ -17,57 +16,69 @@ declare var $: Object;
|
||||||
declare var interfaceConfig: Object;
|
declare var interfaceConfig: Object;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* React {@code Component} for displaying an icon associated with opening the
|
* The type of the React {@code Component} props of
|
||||||
* the {@code RemoteVideoMenu}.
|
* {@link RemoteVideoMenuTriggerButton}.
|
||||||
*
|
|
||||||
* @extends {Component}
|
|
||||||
*/
|
*/
|
||||||
class RemoteVideoMenuTriggerButton extends Component<*> {
|
type Props = {
|
||||||
static propTypes = {
|
|
||||||
/**
|
/**
|
||||||
* A value between 0 and 1 indicating the volume of the participant's
|
* A value between 0 and 1 indicating the volume of the participant's
|
||||||
* audio element.
|
* audio element.
|
||||||
*/
|
*/
|
||||||
initialVolumeValue: PropTypes.number,
|
initialVolumeValue: number,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not the participant is currently muted.
|
* Whether or not the participant is currently muted.
|
||||||
*/
|
*/
|
||||||
isAudioMuted: PropTypes.bool,
|
isAudioMuted: boolean,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not the participant is a conference moderator.
|
* Whether or not the participant is a conference moderator.
|
||||||
*/
|
*/
|
||||||
isModerator: PropTypes.bool,
|
isModerator: boolean,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback to invoke when the popover has been displayed.
|
* Callback to invoke when the popover has been displayed.
|
||||||
*/
|
*/
|
||||||
onMenuDisplay: PropTypes.func,
|
onMenuDisplay: Function,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback to invoke choosing to start a remote control session with
|
* Callback to invoke choosing to start a remote control session with
|
||||||
* the participant.
|
* the participant.
|
||||||
*/
|
*/
|
||||||
onRemoteControlToggle: PropTypes.func,
|
onRemoteControlToggle: Function,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback to invoke when changing the level of the participant's
|
* Callback to invoke when changing the level of the participant's
|
||||||
* audio element.
|
* audio element.
|
||||||
*/
|
*/
|
||||||
onVolumeChange: PropTypes.func,
|
onVolumeChange: Function,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The position relative to the trigger the remote menu should display
|
||||||
|
* from. Valid values are those supported by AtlasKit
|
||||||
|
* {@code InlineDialog}.
|
||||||
|
*/
|
||||||
|
menuPosition: string,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ID for the participant on which the remote video menu will act.
|
* The ID for the participant on which the remote video menu will act.
|
||||||
*/
|
*/
|
||||||
participantID: PropTypes.string,
|
participantID: string,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current state of the participant's remote control session.
|
* The current state of the participant's remote control session.
|
||||||
*/
|
*/
|
||||||
remoteControlState: PropTypes.number
|
remoteControlState: number
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* React {@code Component} for displaying an icon associated with opening the
|
||||||
|
* the {@code RemoteVideoMenu}.
|
||||||
|
*
|
||||||
|
* @extends {Component}
|
||||||
|
*/
|
||||||
|
class RemoteVideoMenuTriggerButton extends Component<Props> {
|
||||||
/**
|
/**
|
||||||
* The internal reference to topmost DOM/HTML element backing the React
|
* The internal reference to topmost DOM/HTML element backing the React
|
||||||
* {@code Component}. Accessed directly for associating an element as
|
* {@code Component}. Accessed directly for associating an element as
|
||||||
|
@ -108,8 +119,7 @@ class RemoteVideoMenuTriggerButton extends Component<*> {
|
||||||
<Popover
|
<Popover
|
||||||
content = { content }
|
content = { content }
|
||||||
onPopoverOpen = { this._onShowRemoteMenu }
|
onPopoverOpen = { this._onShowRemoteMenu }
|
||||||
position = { interfaceConfig.VERTICAL_FILMSTRIP
|
position = { this.props.menuPosition }>
|
||||||
? 'left bottom' : 'top center' }>
|
|
||||||
<span
|
<span
|
||||||
className = 'popover-trigger remote-video-menu-trigger'>
|
className = 'popover-trigger remote-video-menu-trigger'>
|
||||||
<i
|
<i
|
||||||
|
|
Loading…
Reference in New Issue