cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikhil Khandelwal (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-10311) cordova-plugin-camera seems to be using deprecated MediaStream.stop() in browser
Date Tue, 12 Jan 2016 21:49:39 GMT

     [ https://issues.apache.org/jira/browse/CB-10311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Nikhil Khandelwal updated CB-10311:
-----------------------------------
    Labels: browser close cordova-plugin-camera mediastream triaged  (was: close cordova-plugin-camera
mediastream)

> 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
>              Labels: browser, close, cordova-plugin-camera, mediastream, triaged
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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