Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS 11.3 WeChat web page video click cannot play #7951

Closed
qiangyuxiao opened this issue Apr 3, 2018 · 1 comment
Closed

IOS 11.3 WeChat web page video click cannot play #7951

qiangyuxiao opened this issue Apr 3, 2018 · 1 comment

Comments

@qiangyuxiao
Copy link

Version

2.5.2

Link to minimal reproduction

https://mzkr830q3y.codesandbox.io/

Steps to reproduce

  • IOS11.3 system and real machine
  • Open web link in WeChat
  • Click on the video play button

Problem code

created() {
      Bus.$on('playVideo', (item) => {
        this.showVideo = true;
        this.item = item;
        this.handle_play();
      });
    },
methods: {
      handle_play: function () {
          this.showVideo = true;
           setTimeout(() => {
             const video = this.$refs.video;
             try {
               if (!video.paused) {
                // video.pause();
                this.pause(video);
              } else {
                // video.play();
                if (this.canfullScreen()) {
                  this.play(video, true);
                } else {
                  this.play(video);
                }
              }
            } catch (e) {
              console.log(e);
            }
          }, 0);
      }
}

What is expected?

  • IOS11.3 system, normal video playback

What is actually happening?

  • IOS11.3 system, click on the video, has been loaded, can not play
  • IOS other versions and Android click on video in WeChat, can play normally

Any additional comments? (optional)

  • Previously when upgrading vue2.5.2, encountered a problem with the execution timing of $nextTick, downgraded using setTimeout(function(){}, 0)
  • Through the delay time, such as: setTimeout (function () {}, 100), can repair IOS11.3 WeChat web pages can not play the problem
  • Suspected timing issue with Vue 2.5.2 on setTimeout(function(){}, 0) in IOS 11.3 systems
@haoqunjiang
Copy link
Member

The reproduction link is broken due to several failing resources hosted on some unknown (maybe internal?) domain (https://css.intra.weibo.cn). Please provide a valid reproduction.

As for the described problem, #7109 (comment) might be related, and there's a workaround in the subsequent discussions.

As for the event loop issue, we'll likely revert to always using microTasks as Evan stated here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants