|
|
@ -25,12 +25,16 @@ |
|
|
|
@mouseover="showShadow" |
|
|
|
@mouseleave="hideShadow" |
|
|
|
@click="handleClickVideo"> |
|
|
|
<video v-show="localMediaModel.attributes.videoEnabled" |
|
|
|
id="localVideo" |
|
|
|
ref="video" |
|
|
|
disablePictureInPicture="true" |
|
|
|
:class="videoClass" |
|
|
|
class="video" /> |
|
|
|
<div v-show="localMediaModel.attributes.videoEnabled" |
|
|
|
:class="videoWrapperClass" |
|
|
|
class="videoWrapper"> |
|
|
|
<video |
|
|
|
id="localVideo" |
|
|
|
ref="video" |
|
|
|
disablePictureInPicture="true" |
|
|
|
:class="videoClass" |
|
|
|
class="video" /> |
|
|
|
</div> |
|
|
|
<div v-if="!localMediaModel.attributes.videoEnabled && !isSidebar" class="avatar-container"> |
|
|
|
<VideoBackground |
|
|
|
v-if="isGrid || isStripe" |
|
|
@ -42,9 +46,10 @@ |
|
|
|
:disable-tooltip="true" |
|
|
|
:show-user-status="false" |
|
|
|
:user="userId" |
|
|
|
:display-name="displayName" /> |
|
|
|
:display-name="displayName" |
|
|
|
:class="avatarClass" /> |
|
|
|
<div v-if="!userId" |
|
|
|
:class="avatarSizeClass" |
|
|
|
:class="guestAvatarClass" |
|
|
|
class="avatar guest"> |
|
|
|
{{ firstLetterOfGuestName }} |
|
|
|
</div> |
|
|
@ -84,6 +89,7 @@ import { |
|
|
|
} from '@nextcloud/dialogs' |
|
|
|
import video from '../../../mixins/video.js' |
|
|
|
import VideoBackground from './VideoBackground' |
|
|
|
import { ConnectionState } from '../../../utils/webrtc/models/CallParticipantModel' |
|
|
|
|
|
|
|
export default { |
|
|
|
|
|
|
@ -139,8 +145,17 @@ export default { |
|
|
|
return t('spreed', 'Back') |
|
|
|
}, |
|
|
|
|
|
|
|
isNotConnected() { |
|
|
|
// When there is no sender participant (when the MCU is not used, or |
|
|
|
// if it is used but no peer object has been set yet) the local |
|
|
|
// video is shown as connected. |
|
|
|
return this.localCallParticipantModel.attributes.connectionState !== null |
|
|
|
&& this.localCallParticipantModel.attributes.connectionState !== ConnectionState.CONNECTED && this.localCallParticipantModel.attributes.connectionState !== ConnectionState.COMPLETED |
|
|
|
}, |
|
|
|
|
|
|
|
videoContainerClass() { |
|
|
|
return { |
|
|
|
'not-connected': this.isNotConnected, |
|
|
|
speaking: this.localMediaModel.attributes.speaking, |
|
|
|
'video-container-grid': this.isGrid, |
|
|
|
'video-container-stripe': this.isStripe, |
|
|
@ -172,12 +187,26 @@ export default { |
|
|
|
) |
|
|
|
}, |
|
|
|
|
|
|
|
videoWrapperClass() { |
|
|
|
return { |
|
|
|
'icon-loading': this.isNotConnected, |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
avatarSize() { |
|
|
|
return this.useConstrainedLayout ? 64 : 128 |
|
|
|
}, |
|
|
|
|
|
|
|
avatarSizeClass() { |
|
|
|
return 'avatar-' + this.avatarSize + 'px' |
|
|
|
avatarClass() { |
|
|
|
return { |
|
|
|
'icon-loading': this.isNotConnected, |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
guestAvatarClass() { |
|
|
|
return Object.assign(this.avatarClass, { |
|
|
|
['avatar-' + this.avatarSize + 'px']: true, |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
localStreamVideoError() { |
|
|
@ -296,6 +325,13 @@ export default { |
|
|
|
@include avatar-mixin(64px); |
|
|
|
@include avatar-mixin(128px); |
|
|
|
|
|
|
|
.not-connected { |
|
|
|
video, |
|
|
|
.avatar-container { |
|
|
|
opacity: 0.5; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.video-container-grid { |
|
|
|
position:relative; |
|
|
|
height: 100%; |
|
|
@ -314,11 +350,18 @@ export default { |
|
|
|
flex-direction: column; |
|
|
|
} |
|
|
|
|
|
|
|
.videoWrapper, |
|
|
|
.video { |
|
|
|
height: 100%; |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
|
|
|
|
.videoWrapper.icon-loading:after { |
|
|
|
height: 60px; |
|
|
|
width: 60px; |
|
|
|
margin: -32px 0 0 -32px; |
|
|
|
} |
|
|
|
|
|
|
|
.video--fit { |
|
|
|
/* Fit the frame */ |
|
|
|
object-fit: contain; |
|
|
|