|
@@ -134,19 +134,24 @@ export default {
|
|
|
|
|
|
PlayAudio() {
|
|
|
let audioId = this.audioId;
|
|
|
- document.getElementsByTagName("audio").forEach(item => {
|
|
|
- if (item.src === this.mp3) {
|
|
|
- if (item.id !== audioId) {
|
|
|
- item.pause();
|
|
|
- }
|
|
|
- } else {
|
|
|
- item.pause();
|
|
|
+ let audio = document.getElementsByTagName("audio");
|
|
|
+ if(audio&&audio.length>0&&window.location.href.indexOf('GCLS-Learn')==-1){
|
|
|
+ audio.forEach(item => {
|
|
|
+ if (item.src === this.mp3) {
|
|
|
+ if (item.id !== audioId) {
|
|
|
+ item.pause();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ item.pause();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ let video = document.getElementsByTagName("video")
|
|
|
+ if(video&&video.length>0&&window.location.href.indexOf('GCLS-Learn')==-1){
|
|
|
+ video.forEach(vItem => {
|
|
|
+ vItem.pause();
|
|
|
+ });
|
|
|
}
|
|
|
- });
|
|
|
- document.getElementsByTagName("video").forEach(vItem => {
|
|
|
- vItem.pause();
|
|
|
- });
|
|
|
-
|
|
|
if (this.audio.playing) {
|
|
|
this.$refs[audioId].pause();
|
|
|
this.audio.playing = false;
|
|
@@ -221,11 +226,13 @@ export default {
|
|
|
this.playValue = (res / this.audio.maxTime) * 100;
|
|
|
if (playFlag) {
|
|
|
let audio = document.getElementsByTagName("audio");
|
|
|
- audio.forEach(item => {
|
|
|
- if (item.id !== audioId) {
|
|
|
- item.pause();
|
|
|
- }
|
|
|
- });
|
|
|
+ if(audio&&audio.length>0&&window.location.href.indexOf('GCLS-Learn')==-1){
|
|
|
+ audio.forEach(item => {
|
|
|
+ if (item.id !== audioId) {
|
|
|
+ item.pause();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
this.$refs[audioId].play();
|
|
|
}
|
|
|
},
|