Merge branch 'master' of https://gitee.com/mini-org-project/course_information_center_vue
# Conflicts: # src/views/kc/jiaoshi/index.vue
This commit is contained in:
commit
5c7dd98370
|
@ -22,7 +22,7 @@ VITE_GLOB_API_URL=/jeecg-boot
|
|||
VITE_GLOB_DOMAIN_URL=http://bylwcs.nenu.edu.cn/jeecg-boot
|
||||
|
||||
#RTC服务器地址
|
||||
VITE_GLOB_RTC_SERVER = http://bylwcs.nenu.edu.cn/RTCServer
|
||||
VITE_GLOB_RTC_SERVER = http://bylwcs.nenu.edu.cn:8081
|
||||
|
||||
# 接口父路径前缀
|
||||
VITE_GLOB_API_URL_PREFIX=
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
<!-- </a-col> -->
|
||||
<!-- </a-row> -->
|
||||
<div>
|
||||
|
||||
|
||||
<video id="mainVideo" v-bind="videoOption" style="width:100%" @click.prevent.stop></video>
|
||||
<a-card :title="mainVideoCardBoxTitle" class="videoCardMain">
|
||||
<video id="mainVideo" v-bind="videoOption" style="width:100%" @click.prevent.stop></video>
|
||||
</a-card>
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;overflow-x: scroll;">
|
||||
<div v-for="(item,index) of calcOtherVideo()" class="videoMax">
|
||||
|
@ -95,6 +95,7 @@ const _document = window.document;
|
|||
const leftList = <any>ref([]);
|
||||
const currentItem = <any>ref({});
|
||||
const topWidth = <any>ref('0');
|
||||
const mainVideoCardBoxTitle = <any>ref('');
|
||||
|
||||
const videoOption = reactive({
|
||||
// width: '800', //播放器高度
|
||||
|
@ -227,8 +228,14 @@ function calcOtherVideo() :any{
|
|||
function switchVideoToMain(){
|
||||
console.log(`🚀 ~ file: index.vue:188 ~ switchVideoToMain ~ switchVideoToMain: 自动切换第一个子界面到主界面`);
|
||||
nextTick(() => {
|
||||
let firstBox = <HTMLVideoElement> document.querySelector('.videoMax');
|
||||
let titleBox = <HTMLVideoElement> firstBox?.querySelector('.ant-card-head-title');
|
||||
let title = titleBox?.textContent;
|
||||
|
||||
mainVideoCardBoxTitle.value = title;
|
||||
|
||||
let mainVideo = <HTMLVideoElement> document.querySelector('#mainVideo');
|
||||
let firstVideo = <HTMLVideoElement> document.querySelector('.videoMax video');
|
||||
let firstVideo = <HTMLVideoElement> firstBox.querySelector('video');
|
||||
mainVideo.srcObject = firstVideo.srcObject
|
||||
mainVideo.play();
|
||||
});
|
||||
|
@ -238,6 +245,13 @@ function bVideoClick(e){
|
|||
console.log(`bVideoClick: 切换至主界面`);
|
||||
let mainVideo = <HTMLVideoElement> document.querySelector('#mainVideo');
|
||||
let currentVideo = <HTMLVideoElement> e.srcElement;
|
||||
|
||||
let title = currentVideo?.parentElement?.parentElement?.querySelector('.ant-card-head-title')?.textContent
|
||||
mainVideoCardBoxTitle.value = title;
|
||||
console.log(`🚀 --------------------------------------------------------------------🚀`);
|
||||
console.log(`🚀 ~ file: index.vue:238 ~ bVideoClick ~ currentVideo:`, currentVideo);
|
||||
console.log(`🚀 --------------------------------------------------------------------🚀`);
|
||||
|
||||
mainVideo.srcObject = currentVideo.srcObject
|
||||
mainVideo.play();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue