Imgselect: Mediastream stop is not a Function

Asked

Viewed 172 times

1

I asked this question here at Stackoverflow in English:

getUserMedia has now been discontinued on https connections?

And I noticed that after having uploaded a system to the server, the camera stopped working. The domain has HTTPS.

Now I’m getting the following error in Plugin named ImgSelect:

imgSelect.min.js:249 Uncaught Typeerror: n.stop is not a Function

That is, this function, which existed before, no longer exists.

Previously, I learned that the method MediaStream.stop would be removed as it was discontinued.

How can I solve this problem?

  • MediaStreamTrack.stop()

  • That’s not it @Marcoauréliodeleu.

  • This negative (regardless of who gave it) there is no reason.

  • I gave +1 to match. = D

  • Thanks. It’s hard here :D

  • Don’t even talk. I was warned to give many negative votes to one person.

Show 1 more comment

1 answer

1

I managed to solve the problem on my own. I am not in favor of changing source code of anything, but in that case I changed the code of the Imgselect that had this excerpt:

if (n) n.stop();

For that reason

 if (n) {
     n.stop ? n.stop() : n.getVideoTracks()[0].stop();
 }

There was nothing on the internet about it yet, so I decided to ask here at SOPT.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.