forked from sagi/seepur
basic transitions in call session
This commit is contained in:
parent
e864966a2d
commit
e4daaac0b1
7 changed files with 59 additions and 7 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -6978,3 +6978,22 @@ video {
|
||||||
|
|
||||||
.fade-enter, .fade-leave-to {
|
.fade-enter, .fade-leave-to {
|
||||||
opacity: 0; }
|
opacity: 0; }
|
||||||
|
|
||||||
|
.slide-left-enter-active,
|
||||||
|
.slide-left-leave-active,
|
||||||
|
.slide-right-enter-active,
|
||||||
|
.slide-right-leave-active {
|
||||||
|
transition-duration: 0.2s;
|
||||||
|
transition-property: height, opacity, transform;
|
||||||
|
transition-timing-function: ease-in-out;
|
||||||
|
overflow: hidden; }
|
||||||
|
|
||||||
|
.slide-left-enter,
|
||||||
|
.slide-right-leave-active {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translate(2em, 0); }
|
||||||
|
|
||||||
|
.slide-left-leave-active,
|
||||||
|
.slide-right-enter {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translate(-2em, 0); }
|
||||||
|
|
|
@ -285,3 +285,25 @@ video{
|
||||||
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
|
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.slide-left-enter-active,
|
||||||
|
.slide-left-leave-active,
|
||||||
|
.slide-right-enter-active,
|
||||||
|
.slide-right-leave-active {
|
||||||
|
transition-duration: 0.2s;
|
||||||
|
transition-property: height, opacity, transform;
|
||||||
|
transition-timing-function: ease-in-out;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-left-enter,
|
||||||
|
.slide-right-leave-active {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translate(2em, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-left-leave-active,
|
||||||
|
.slide-right-enter {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translate(-2em, 0);
|
||||||
|
}
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-else class>
|
<div v-else class>
|
||||||
<VideoStrip :localStream="localStream" :remoteStream="remoteStream" />
|
<VideoStrip :localStream="localStream" :remoteStream="remoteStream" />
|
||||||
<router-view></router-view>
|
<transition :name="stateTransitionName">
|
||||||
|
<router-view></router-view>
|
||||||
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -86,12 +88,21 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(["user", "inCall"])
|
...mapGetters(["user", "inCall"])
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
$route(to, from) {
|
||||||
|
const toDepth = to.path.split("/").length;
|
||||||
|
const fromDepth = from.path.split("/").length;
|
||||||
|
this.stateTransitionName =
|
||||||
|
toDepth < fromDepth ? "slide-right" : "slide-left";
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true,
|
loading: true,
|
||||||
localStream: null,
|
localStream: null,
|
||||||
remoteStream: null,
|
remoteStream: null,
|
||||||
callManager: null as CallManager
|
callManager: null as CallManager,
|
||||||
|
stateTransitionName: "slide-left"
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
beforeCreate: () => {}
|
beforeCreate: () => {}
|
||||||
|
|
Loading…
Reference in a new issue