JSFiddle - React, Tailwind, and code Playground

by angchen

HTML

<!DOCTYPE html>
  <!--
   @license
   Copyright 2023 Google LLC. All Rights Reserved.
   SPDX-License-Identifier: Apache-2.0
  -->
  <html>
    <head>
      <title>Aerial View</title>
      <style>
        /**
         * @license
         * Copyright 2023 Google LLC. All Rights Reserved.
         * SPDX-License-Identifier: Apache-2.0
         */
        html,
        body {
          align-items: center;
          display: flex;
          height: 100%;
          width: 100%;
          justify-content: center;
        }

        .aerial-view-media {
          object-fit: contain;
          height: 100%;
          width: 100%;
        }

        .container {
          display: flex;
          overflow: hidden;
          position: relative;
          align-items: center;
          justify-content: center;
          width: 100%;
          height: 100%;
          max-height: 780px;
          max-width: 780px;
        }
      </style>
    </head>
    <body>
      <div class="container">
        <video class="aerial-view-media" muted autoplay loop>
          Your browser does not support HTML5 video.
        </video>
      </div>
    </body>
    <script>
      /**
       * @license
       * Copyright 2023 Google LLC. All Rights Reserved.
       * SPDX-License-Identifier: Apache-2.0
       */
      // To use video ID as parameter input instead of address, replace parameter value with a videoID '-wVXGP6Hkogfqz6sZulUf3'.
      const PARAMETER_VALUE = '1600 Amphitheatre Parkway, Mountain View, CA 94043';
      const API_KEY = 'AIzaSyA6kjbNIy9pZEUd_k85Sg3eSTsTvnk6ahA';

      async function initAerialView() {
        const displayEl = document.querySelector('video');
        displayEl.addEventListener('click', function () {
          if (displayEl.paused) {
          displayEl.play();
          } else {
            displayEl.pause();
          }
        });

        // Parameter key can accept either 'videoId' or 'address' depending on input.
        const parameterKey =...