Skip to content

mkotsbak/scalajs-qcode-decoder

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

scalajs-qcode-decoder

Scala.Js wrapper for QRCodeDecoder JS library for decoding QR codes.

How to use it

Add this library to project dependencies (until it is published somewhere, you need to download this project and run "sbt publish-local" first):

libraryDependencies += "io.github.mkotsbak" %%% "scalajs-qcode-decoder" % "0.1.0-SNAPSHOT" withSources() withJavadoc()

Example usage:

val qrDecoder = new QCodeDecoder()
        
def decodeQr(): Unit = {
    val res = qrDecoder.decodeFromCameraOnce(cameraElement, keepStream = true)
    res.onFailure {
        case ex: JavaScriptException => println(s"Err ${ex.toString()}")
    }
    res.foreach { text =>
        println(text)
    }
}

About

Scala.Js wrapper for qcode-decoder JS library for decoding QR codes in web/JS applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages