Browse Source

example: fullScreen

MinJieLiu 5 years ago
parent
commit
751b7df3c4
1 changed files with 3 additions and 1 deletions
  1. 3 1
      example/src/index.tsx

+ 3 - 1
example/src/index.tsx

@@ -134,7 +134,9 @@ export const WithToolbar = () => {
             >
               <path d="M565.5 202.5l75-75v225h-225l103.5-103.5c-34.5-34.5-82.5-57-135-57-106.5 0-192 85.5-192 192s85.5 192 192 192c84 0 156-52.5 181.5-127.5h66c-28.5 111-127.5 192-247.5 192-141 0-255-115.5-255-256.5s114-256.5 255-256.5c70.5 0 135 28.5 181.5 75z" />
             </svg>
-            <FullScreenIcon onClick={toggleFullScreen} />
+            {document.fullscreenEnabled && (
+              <FullScreenIcon onClick={toggleFullScreen} />
+            )}
           </>
         );
       }}