cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-13384) URL.createObjectURL(stream) is deprecated! Use elem.srcObject = stream instead!
Date Tue, 03 Oct 2017 16:26:00 GMT

    [ https://issues.apache.org/jira/browse/CB-13384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16189930#comment-16189930
] 

ASF GitHub Bot commented on CB-13384:
-------------------------------------

GitHub user mvandervliet opened a pull request:

    https://github.com/apache/cordova-plugin-camera/pull/288

    CB-13384: (browser) Added deprecation of video.src compatibility

    ### Platforms affected
    Browser
    
    ### What does this PR do?
    Updates CameraProxy.js to support video.srcObject and preserves backwards compatibility
with URL.createObjectURL
    
    ### What testing has been done on this change?
    Browser
    
    ### Checklist
    - [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA
database
    - [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file
paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    - [X] Added automated test coverage as appropriate for this change.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mvandervliet/cordova-plugin-camera bugfix/CB-13384_video_src_deprecation

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-camera/pull/288.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #288
    
----
commit f83283a334a6faa3d9b48932a0e085decbad9d68
Author: Matt Vander Vliet <matthew.vander.vliet@oracle.com>
Date:   2017-10-03T15:56:43Z

    CB-13384: (browser) Added deprecation of video.src compatibility

----


> URL.createObjectURL(stream) is deprecated! Use elem.srcObject = stream instead!
> -------------------------------------------------------------------------------
>
>                 Key: CB-13384
>                 URL: https://issues.apache.org/jira/browse/CB-13384
>             Project: Apache Cordova
>          Issue Type: Bug
>         Environment: Browser
> * Safari - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.1.38 (KHTML,
like Gecko) Version/11.0 Safari/604.1.38" {color:red}(exception){color}
> * Chrome - "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46
(KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1" {color:#f79232}(deprecation warning){color}
>            Reporter: Matt Vander Vliet
>            Priority: Trivial
>
> {{CameraProxy.js}} from {{cordova-camera-plugin}} has code deprecated by Safari 11, and
issues deprecation warnings in Chrome, etc. 
> Proposed fix:
> {code}
>      var successCallback = function (stream) {
>          localMediaStream = stream;
> -        video.src = window.URL.createObjectURL(localMediaStream);
> +        try {
> +            video.src = window.URL.createObjectURL(localMediaStream);
> +        } catch (e) {
> +            video.srcObject = localMediaStream;
> +        }
>          video.play();
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message