Closed huangxinjian closed 4 years ago
The problem is solved! The reason is that the 'getContext(' webGL ')' mode is used by default when drawing canvas in Jsmpeg, while the 'getContext(' 2D ')' mode of the same canvas is needed in face-APi.js, resulting in conflicts. However, face-APi.js does not throw any error exception, which makes it difficult to find the problem
sorry. Forget to add the solution. Just add one attribute disableGl
in the JSMPEG
this.playerL = new JSMpeg.Player(urlL, { canvas: myPlayerL, disableGl: true })
(English is not my first language, sorry)
I use "rtsp-to-stream" which is use to transcoding and jsmpeg to play my camera.
and I use "videoFaceTracking.html" , this examples to do experiment.
this is my Html code:
and my jsmpeg code
and I change
onPlay()
args like this:then I want to get some info by console , so I change
onPlay
body like thisnext is my question.
I find that it doesn't have any output unless I set my-Player-min to "display: none"
So I wonder why this is happening