I'm trying to import face-api.js to my plugin
I've tried to call the js from attempt.php
by that line $PAGE->requires->js('/mod/quiz/accessrule/plugin/amd/src/face-api.js');
It loaded successfully , but when I tried to call it from another js
using those lines
Promise.all([
faceapi.nets.tinyFaceDetector.loadFromUri('./models'),
faceapi.nets.faceLandmark68Net.loadFromUri('./models'),
faceapi.nets.faceRecognitionNet.loadFromUri('./models'),
faceapi.nets.ssdMobilenetv1.loadFromUri('./models')
]).then(start)
my problem essentially is how to made faceapi defined or simply how to import face-api.js globally in the attempt page