Merge branch 'dev-yxl' of gitee.com:zongzhige/shopxo-uniapp into dev

master
gongfuxiang 2026-01-08 11:20:34 +08:00
commit 076c44b395
3 changed files with 8 additions and 47 deletions

View File

@ -339,18 +339,8 @@
//
attemptAutoPlay(videoElement, isMuted) {
const playPromise = videoElement.play();
uni.showToast({
title: '开始尝试播放' + playPromise,
icon: 'success',
mask: true
})
if (playPromise !== undefined) {
playPromise.then(() => {
uni.showToast({
title: '播放成功' + videoElement.muted,
icon: 'success',
mask: true
})
//
this.autoplayRejected = false;
//
@ -360,11 +350,6 @@
});
})
.catch((error) => {
uni.showToast({
title: '播放失败' + videoElement.muted,
icon: 'error',
mask: true
})
//
this.autoplayRejected = true;
//
@ -650,10 +635,6 @@
this.videoEl.controls = controls
this.videoEl.muted = muted
this.videoEl.playbackRate = playbackRate
uni.showToast({
title: this.autoplayRejected && autoplay ? '自动播放失败,请手动播放' : '自动播放成功',
icon: 'none'
});
//
if (this.autoplayRejected && autoplay) {
this.attemptAutoPlay(this.videoEl, muted);

View File

@ -153,13 +153,9 @@
*/
// 访
// , ,
auto_play_success(e) {
uni.showToast({
title: this.muted ? '静音播放成功' : '非静音播放成功',
icon: 'none'
});
auto_play_success() {
//
if (e) {
if (this.muted) {
this.$emit('mutedAutoPlaySuccess', this.muted);
}
},
@ -170,20 +166,12 @@
* @param {Boolean} e - 是否自动播放失败
*/
// ,
auto_play_error(e) {
//
if (!e) {
console.log(this.muted);
uni.showToast({
title: this.muted ? '静音播放失败' : '非静音播放失败',
icon: 'none'
});
//
if (this.muted) {
this.$emit('mutedAutoPlayError');
} else {
this.muted = true;
}
auto_play_error() {
//
if (this.muted) {
this.$emit('mutedAutoPlayError');
} else {
this.muted = true;
}
},

View File

@ -65,19 +65,11 @@
},
methods: {
muted_auto_play_success(is_muted) {
uni.showToast({
title: this.is_muted ? '静音播放成功' : '222225',
icon: 'none'
});
if (is_muted) {
this.is_muted_auto_play_success = true;
}
},
muted_auto_play_error() {
uni.showToast({
title: '显示图标提示',
icon: 'none'
});
this.is_muted_auto_play_error = true;
},
//