victordibia / handtrack.js

A library for prototyping realtime hand detection (bounding box), directly in the browser.
https://victordibia.com/handtrack.js/
MIT License
2.83k stars 250 forks source link

ERROR Error: Uncaught (in promise): Error: Failed to compile fragment shader. #74

Open cloudyape opened 2 years ago

cloudyape commented 2 years ago

Below is the Code in Angular 14. Getting ERROR Error: Uncaught (in promise): Error: Failed to compile fragment shader.

async handposes() { const img = document.getElementById('videoid');

handTrack.startVideo(img);
/* start camera input stream on the provided video tag. returns a promise with message format
{ status: false, msg: 'please provide a valid video element' } 
*/
//const img = this.canvas;
const model = await handTrack.load();
const predictions = await model.detect(img);
console.log('getpredictions');

}

ngAfterViewInit(): void { /this._recognizer.initialize( this.canvas.nativeElement, this.video.nativeElement );/ this.handposes(); }