Comments (7)
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.
Thank you very much. It works great.
from ngx-scanner.
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.
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.
Will check on that
from ngx-scanner.
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.
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)
- How to use highest possible resolution for ngx-scanner with Angular 13
- When running ng serve shows the following error: HOT 5
- Read barcode numbers (not scan) HOT 3
- Auto focus/zoom / High Resolution does not work
- How to select the correct camera with autofocus? HOT 2
- noposter error again! HOT 2
- Need to touch the screen to see the camera
- have multiple webcam still get Cameras not found.
- Poor sharpness on iPhone Pro HOT 1
- Property '"autofocusEnabled"' is incompatible with index signature. HOT 2
- Cannot Scan code 93 and Codabar barcodes. No errors in the console as well
- cannot scan UPC_E barcodes
- Cannot read properties of undefined (reading stop)
- [Firefox-android] Permission issue HOT 1
- Please support Angular 17 HOT 1
- Cordova Android app
- Area of intreset feature HOT 1
- Windows 11, camera shows screen stream instead
- Error reading QR code in Chrome
- when you open a scanner multiple times the CPU usage gets to 100% HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-scanner.