Giter Club home page Giter Club logo

Comments (5)

huangsong avatar huangsong commented on June 2, 2024 4

edit scanner.js

    analyze() {
        if (!this.video.videoWidth) {
          return null;
        }
    
        //if (!this.imageBuffer) {
          let videoWidth = this.video.videoWidth;
          let videoHeight = this.video.videoHeight;
    
          this.sensorWidth = videoWidth;
          this.sensorHeight = videoHeight;
          this.sensorLeft = Math.floor((videoWidth / 2) - (this.sensorWidth / 2));
          this.sensorTop = Math.floor((videoHeight / 2) - (this.sensorHeight / 2));
    
          this.canvas.width = this.sensorWidth;
          this.canvas.height = this.sensorHeight;
    
          this.canvasContext = this.canvas.getContext('2d');
          this.imageBuffer = ZXing._resize(this.sensorWidth, this.sensorHeight);
          //return null;
        //}

fix this bug.

from instascan.

andrewgurn avatar andrewgurn commented on June 2, 2024 1

Might have found the fixed. (Confirming with another iPhone iOS 15) Fixed is only for Safari (Chrome seems like those option are default) Setting > Safari > Advanced > Experimental Feature >Untick all GPU Process : *

You're an absolute legend. This has solved the issue for me.

from instascan.

ibnusulaiman83 avatar ibnusulaiman83 commented on June 2, 2024 1

edit scanner.js

    analyze() {
        if (!this.video.videoWidth) {
          return null;
        }
    
        //if (!this.imageBuffer) {
          let videoWidth = this.video.videoWidth;
          let videoHeight = this.video.videoHeight;
    
          this.sensorWidth = videoWidth;
          this.sensorHeight = videoHeight;
          this.sensorLeft = Math.floor((videoWidth / 2) - (this.sensorWidth / 2));
          this.sensorTop = Math.floor((videoHeight / 2) - (this.sensorHeight / 2));
    
          this.canvas.width = this.sensorWidth;
          this.canvas.height = this.sensorHeight;
    
          this.canvasContext = this.canvas.getContext('2d');
          this.imageBuffer = ZXing._resize(this.sensorWidth, this.sensorHeight);
          //return null;
        //}

fix this bug.

how to find scanner.js files. I am using

<script type="text/javascript" src="plugins/instascan.min/instascan.min.js"></script>

from instascan.

itsgmart avatar itsgmart commented on June 2, 2024

Might have found the fixed. (Confirming with another iPhone iOS 15)
Fixed is only for Safari (Chrome seems like those option are default)
Setting > Safari > Advanced > Experimental Feature >Untick all GPU Process : *

from instascan.

ashu4code avatar ashu4code commented on June 2, 2024

Now i test on IOS 14,ios 15 ,, Browser chrome safari..Instscan work well.

from instascan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.