Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25314

iOS: camera with overlay view is zoomed

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 7.3.0
    • Component/s: iOS
    • Labels:
    • Environment:

      Tested with 6.1.1.GA and 6.2.0.GA sdks.
      iPhone 5.

    • Story Points:
      8
    • Sprint:
      2018 Sprint 06 SDK, 2018 Sprint 07 SDK, 2018 Sprint 08 SDK, 2018 Sprint 09 SDK, 2018 Sprint 10 SDK, 2018 Sprint 11 SDK

      Description

      If I add overlayView to camera, then camera view becomes zoomed. Without overlayView camera has another zoom value. I prepared test project.

      index.js:

      var overlay = Ti.UI.createView({});
      var closeBtn = Ti.UI.createButton({
          width: "40dp",
          height: "40dp",
          backgroundColor: "red",
          opacity: 0.3,
          bottom: "10dp",
          left: "10dp"
      });
      closeBtn.addEventListener("click", function() {
          Ti.Media.hideCamera();
      });
      overlay.add(closeBtn);
       
      function onGallery() {
          Ti.Media.showCamera({
              mediaTypes: [Ti.Media.MEDIA_TYPE_VIDEO],
              showControls: true,
              success:function(e) {
                  console.log("\n success");
              },
              cancel: function() {
                  console.log("cancel");
              },
              error:function(error) {
                  console.log("error");
              }
          });
      }
       
      function onGalleryOverlay() {
          Ti.Media.showCamera({
              mediaTypes: [Ti.Media.MEDIA_TYPE_VIDEO],
              showControls: false,
              overlay: overlay,
              success:function(e) {
                  console.log("\n success");
              },
              cancel: function() {
                  console.log("cancel");
              },
              error:function(error) {
                  console.log("error");
              }
          });
      }
       
      function onGalleryWithoutControls() {
          Ti.Media.showCamera({
              mediaTypes: [Ti.Media.MEDIA_TYPE_VIDEO],
              showControls: false,
              success:function(e) {
                  console.log("\n success");
              },
              cancel: function() {
                  console.log("cancel");
              },
              error:function(error) {
                  console.log("error");
              }
          });
      }
       
      $.win.open();
      

      index.html:

      <Alloy>
      	<Window id='win' backgroundColor="white">
      		<Button bottom="10dp" width="80%" height="50dp" title="Gallery" onClick="onGallery" />
      		<Button bottom="70dp" width="80%" height="50dp" title="Gallery with overlay" onClick="onGalleryOverlay" />
      		<Button bottom="130dp" width="80%" height="50dp" title="Gallery without controls" onClick="onGalleryWithoutControls" />
      	</Window>
      </Alloy>
      

        Attachments

          Activity

            People

            • Assignee:
              vijaysingh Vijay Singh
              Reporter:
              zozo4kin Zakhar Zhuravlev
              Reviewer:
              Hans Knöchel
              Tester:
              Samir Mohammed
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-11168
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code