|
@@ -443,37 +443,31 @@ export default {
|
|
if (this.stremOtherlist.length > 0) {
|
|
if (this.stremOtherlist.length > 0) {
|
|
const swichstrem = _.find(this.stremOtherlist, { switchzjrid: switchzjr, type: 'other' });
|
|
const swichstrem = _.find(this.stremOtherlist, { switchzjrid: switchzjr, type: 'other' });
|
|
if (swichstrem) {
|
|
if (swichstrem) {
|
|
- const oldstrem_ = _.find(this.stremlist, { type: 'mainr' });
|
|
|
|
- if (oldstrem_) {
|
|
|
|
- this.stermStop(oldstrem_.strem);
|
|
|
|
|
|
+ for (const oldstrem_ of this.stremlist) {
|
|
|
|
+ if (oldstrem_.type === 'mainr') {
|
|
|
|
+ this.stermStop(oldstrem_.strem);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.stermPlay(swichstrem.strem, 'look-video-right');
|
|
this.stermPlay(swichstrem.strem, 'look-video-right');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async swichzbVideo(body) {
|
|
async swichzbVideo(body) {
|
|
- // 主持的场合
|
|
|
|
- if (body.iszc === '0') {
|
|
|
|
- const mainstrem_ = _.find(this.stremlist, { type: 'mainr' });
|
|
|
|
- const newdatas = [];
|
|
|
|
- if (mainstrem_) {
|
|
|
|
- newdatas.push(mainstrem_);
|
|
|
|
- this.$set(this, `stremlist`, newdatas);
|
|
|
|
- this.stermStop(mainstrem_.strem);
|
|
|
|
- this.stermPlay(mainstrem_.strem, 'look-video-right');
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- // 主讲
|
|
|
|
- const othestrem_ = _.find(this.stremOtherlist, { switchzjrid: switchzjr, type: 'other' });
|
|
|
|
|
|
+ //
|
|
|
|
+ const mainstrem_ = _.find(this.stremlist, { type: 'mainr' });
|
|
|
|
+ const newdatas = [];
|
|
|
|
+ if (body.switchzjr) {
|
|
|
|
+ const othestrem_ = _.find(this.stremOtherlist, { switchzjrid: body.switchzjr, type: 'other' });
|
|
if (othestrem_) {
|
|
if (othestrem_) {
|
|
- const mainstrem_ = _.find(this.stremlist, { type: 'mainr' });
|
|
|
|
- if (mainstrem_) {
|
|
|
|
- this.stermStop(mainstrem_.strem);
|
|
|
|
- }
|
|
|
|
this.stermStop(othestrem_.strem);
|
|
this.stermStop(othestrem_.strem);
|
|
- this.stermPlay(othestrem_.strem, 'look-video-right');
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if (mainstrem_) {
|
|
|
|
+ newdatas.push(mainstrem_);
|
|
|
|
+ this.$set(this, `stremlist`, newdatas);
|
|
|
|
+ this.stermStop(mainstrem_.strem);
|
|
|
|
+ this.stermPlay(mainstrem_.strem, 'look-video-right');
|
|
|
|
+ }
|
|
const sharestrem_ = _.find(this.stremlist, { type: 'share' });
|
|
const sharestrem_ = _.find(this.stremlist, { type: 'share' });
|
|
if (sharestrem_) {
|
|
if (sharestrem_) {
|
|
this.stermStop(sharestrem_.strem);
|
|
this.stermStop(sharestrem_.strem);
|