Skip to content

v4.12.0

Latest
Compare
Choose a tag to compare
@C-D-Lewis C-D-Lewis released this 11 Jul 08:35
· 5 commits to master since this release
e0b6c4b

Features

  • Add onScanFrameData option that allows an app to obtain an image of the video stream at the point
    in time a code was scanned, which can be useful for driving UIs. It accepts a callback function
    that is called with the base64 image data in the chosen imageConversion format:

    const opts = {
      filter: { method, type },
      containerId,
      onScanFrameData: (base64) => {
        // Show the frame at the point of decode
        img.src = base64;
      },
    };
    
    const res = await operator.scanStream(opts);
    console.log(res);

    If the autoStop: false option is used, then this callback is called for each successive scan.