Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13384

URL.createObjectURL(stream) is deprecated! Use elem.srcObject = stream instead!

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • None
    • cordova-plugin-camera
    • None

    Description

      CameraProxy.js from cordova-camera-plugin has code deprecated by Safari 11, and issues deprecation warnings in Chrome, etc.

      Proposed fix:

           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();
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            vandervl Matt Vander Vliet
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: