cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sven van de Scheur (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CB-10311) cordova-plugin-camera seems to be using deprecated MediaStream.stop() in browser
Date Fri, 08 Jan 2016 16:23:39 GMT
Sven van de Scheur created CB-10311:
---------------------------------------

             Summary: cordova-plugin-camera seems to be using deprecated MediaStream.stop()
in browser
                 Key: CB-10311
                 URL: https://issues.apache.org/jira/browse/CB-10311
             Project: Apache Cordova
          Issue Type: Bug
          Components: Plugin Camera
    Affects Versions: 3.5.0
         Environment: Chrome 47
            Reporter: Sven van de Scheur
            Priority: Minor


The cordova-plugin-camera camera proxy for utilizes a deprecated MediaStream.stop(). On Chrome
47 this throws an exception:

"Uncaught TypeError: localMediaStream.stop is not a function" thrown from CameraProxy.js:69:
 
        // stop video stream, remove video and button
        localMediaStream.stop();

According to https://developers.google.com/web/updates/2015/07/mediastream-deprecations?hl=en
MediaStream.stop() has been deprecated in favor of MediaStreamTrack.stop(). And the code should
be changed accordingly.

I think this should be changed roughly to:

        // stop video stream, remove video and button
        var tracks = localMediaStream.getTracks();
        tracks.forEach(function(track) {
                track.stop();
        })



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message