Code Monkey home page Code Monkey logo

Comments (7)

Timothee-Retailleau avatar Timothee-Retailleau commented on September 14, 2024

you can resize with your host component css with ng-deep

::ng-deep video {
    max-height: 70vh;
    width: 100vw;
    object-fit: contain;
}

from ngx-scanner.

skuppa avatar skuppa commented on September 14, 2024

Thank you very much. It works great.

from ngx-scanner.

werthdavid avatar werthdavid commented on September 14, 2024

Thanks for the help Timothee.
Will probably make an Input so you can pass an extra css-class do avoid using /deep/....

from ngx-scanner.

FvelascoDS avatar FvelascoDS commented on September 14, 2024

Hi there!
I've seen that this issue is closed, however let me comment a couple of things.
I'm using this package in an Ionic/Angular app. I've been experiencing the same problem with the video size. I added [cssClass] ="small-Video" and its respective class in the css file, but nothing changed.
I checked my ngx-zxing version, it's the last version until now, 0.3.4.
After inspecting the "preview" element in the browser I realized that the resulting html code for this element might be wrong; indeed the class name was empty or its value is "NaN" (I got two versions...):

Version 1:
<video id="preview" class autoplay="true" muted="true" playsinline="true" autofocus="true">

Version 2:

<video id="preview" class="NaN" autoplay="true" muted="true" playsinline="true" autofocus="true">


I solved this adding the same class afterwards through js code:
document.getElementById("preview").className = "small-Video";

Thanks for your great work.

from ngx-scanner.

werthdavid avatar werthdavid commented on September 14, 2024

Will check on that

from ngx-scanner.

werthdavid avatar werthdavid commented on September 14, 2024

Just looked at your example... It seems like your binding is wrong.
Please try either
[cssClass]="'small-video'"
or
cssClass="small-video"

I will update the Readme

from ngx-scanner.

lock avatar lock commented on September 14, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from ngx-scanner.

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.