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
|
VITE_GLOB_DOMAIN_URL=http://bylwcs.nenu.edu.cn/jeecg-boot
|
||||||
|
|
||||||
#RTC服务器地址
|
#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=
|
VITE_GLOB_API_URL_PREFIX=
|
||||||
|
|
|
@ -36,9 +36,9 @@
|
||||||
<!-- </a-col> -->
|
<!-- </a-col> -->
|
||||||
<!-- </a-row> -->
|
<!-- </a-row> -->
|
||||||
<div>
|
<div>
|
||||||
|
<a-card :title="mainVideoCardBoxTitle" class="videoCardMain">
|
||||||
|
<video id="mainVideo" v-bind="videoOption" style="width:100%" @click.prevent.stop></video>
|
||||||
<video id="mainVideo" v-bind="videoOption" style="width:100%" @click.prevent.stop></video>
|
</a-card>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;overflow-x: scroll;">
|
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;overflow-x: scroll;">
|
||||||
<div v-for="(item,index) of calcOtherVideo()" class="videoMax">
|
<div v-for="(item,index) of calcOtherVideo()" class="videoMax">
|
||||||
|
@ -95,6 +95,7 @@ const _document = window.document;
|
||||||
const leftList = <any>ref([]);
|
const leftList = <any>ref([]);
|
||||||
const currentItem = <any>ref({});
|
const currentItem = <any>ref({});
|
||||||
const topWidth = <any>ref('0');
|
const topWidth = <any>ref('0');
|
||||||
|
const mainVideoCardBoxTitle = <any>ref('');
|
||||||
|
|
||||||
const videoOption = reactive({
|
const videoOption = reactive({
|
||||||
// width: '800', //播放器高度
|
// width: '800', //播放器高度
|
||||||
|
@ -227,8 +228,14 @@ function calcOtherVideo() :any{
|
||||||
function switchVideoToMain(){
|
function switchVideoToMain(){
|
||||||
console.log(`🚀 ~ file: index.vue:188 ~ switchVideoToMain ~ switchVideoToMain: 自动切换第一个子界面到主界面`);
|
console.log(`🚀 ~ file: index.vue:188 ~ switchVideoToMain ~ switchVideoToMain: 自动切换第一个子界面到主界面`);
|
||||||
nextTick(() => {
|
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 mainVideo = <HTMLVideoElement> document.querySelector('#mainVideo');
|
||||||
let firstVideo = <HTMLVideoElement> document.querySelector('.videoMax video');
|
let firstVideo = <HTMLVideoElement> firstBox.querySelector('video');
|
||||||
mainVideo.srcObject = firstVideo.srcObject
|
mainVideo.srcObject = firstVideo.srcObject
|
||||||
mainVideo.play();
|
mainVideo.play();
|
||||||
});
|
});
|
||||||
|
@ -238,6 +245,13 @@ function bVideoClick(e){
|
||||||
console.log(`bVideoClick: 切换至主界面`);
|
console.log(`bVideoClick: 切换至主界面`);
|
||||||
let mainVideo = <HTMLVideoElement> document.querySelector('#mainVideo');
|
let mainVideo = <HTMLVideoElement> document.querySelector('#mainVideo');
|
||||||
let currentVideo = <HTMLVideoElement> e.srcElement;
|
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.srcObject = currentVideo.srcObject
|
||||||
mainVideo.play();
|
mainVideo.play();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue