MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-SelfieShot: Rotating camera

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    11 Posts 3 Posters 4.6k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      MMRIZE @hclaus
      last edited by

      @hclaus
      custom.css

      #SELFIE .result {
        width: auto;
        height: auto;
        aspect-ratio: 1 / 1;
      }
      
      @media (min-aspect-ratio: 1 / 1) { /* Horizontal Screen */
        #SELFIE .result {
          left: calc((100vw - 90vh) / 2);
          transform: rotate(90deg);
          width: 90vh;
          top: 0;
        }
      }
      @media (max-aspect-ratio: 1 / 1) { /* Vertical Screen */
        #SELFIE .result {
          top: calc((100vh - 90vw) / 2);
          transform: rotate(90deg);
          height: 90vw;
          left: 0;
        }
      }
      

      You can adjust some values for your purpose.

      S M 2 Replies Last reply Reply Quote 0
      • S Offline
        sdetweil @MMRIZE
        last edited by

        @MMRIZE said in MMM-SelfieShot: Rotating camera:

        top: calc((100vh - 90vw) / 2);

        height -width?

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          MMRIZE @sdetweil
          last edited by

          @sdetweil
          Yes, It works. Guess it. :)

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @MMRIZE
            last edited by sdetweil

            @MMRIZE hm… on my 2560wx1080h, top is -612

            on my 3840wx2160h, top is -648
            ((12160) -(.93840))/2

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            M 1 Reply Last reply Reply Quote 0
            • M Offline
              MMRIZE @sdetweil
              last edited by MMRIZE

              @sdetweil
              It would be rotated.

              2560w x 1080h
              that is horizontal resolution, so by media rule; below will be adopted;

              left: calc((100vw - 90vh) / 2); /* (2560 - 972) / 2 = 794 */
              transform: rotate(90deg);
              width: 90vh; /* 972 */
              height: (auto) /* 972, by aspect-ratio: 1 / 1; */
              top: 0;
              
              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @MMRIZE
                last edited by

                @MMRIZE ok, got it…

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • M Offline
                  MMRIZE @MMRIZE
                  last edited by

                  @hclaus
                  Anyway, this is a universal solution, because I don’t know your screen resolution, direction, background padding/margin, wanted photo size, etc.
                  With specific conditions, it would be deadly simpler.

                  1 Reply Last reply Reply Quote 0
                  • 1
                  • 2
                  • 2 / 2
                  • First post
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Sam, technical setup by Karsten.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy