From 3bd48523d93ffc89f67180ac759996b967936268 Mon Sep 17 00:00:00 2001 From: Louis Date: Thu, 22 Jun 2023 16:47:59 +0200 Subject: [PATCH] feat: :sparkles: Video and ip works !! --- src/App.tsx | 18 ++++++++++++------ src/index.css | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 6 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index a564ede..342a2b5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,6 +1,7 @@ -import { useState, useEffect } from 'react' +import React, { useState, useEffect } from 'react' import './App.css' import axios from 'axios' +import ReactPlayer from 'react-player' import video from './assets/GarfieldIP.mp4' function App() { @@ -18,11 +19,16 @@ function App() { return ( <> -
-

Your IP Address is

-

{ip || "loading"}

- -
+
+

Your IP Address is

+

{ip || "loading"}

+
+
+
) } diff --git a/src/index.css b/src/index.css index 2c3fac6..64130e1 100644 --- a/src/index.css +++ b/src/index.css @@ -67,3 +67,46 @@ button:focus-visible { background-color: #f9f9f9; } } + + +.wrapper { + position: relative; + padding-top: 56.25%; /* Player ratio: 100 / (1280 / 720) */ + size: 300%; +} + +.player { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + size: 300%; +} + +.overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + color: white; + font-size: 24px; + size: 300%; +} + +.video-container { + position: relative; + width: 100%; +} + +.text-overlay { + position: absolute; + top: 53%; + left: 60%; + transform: translate(-50%, -50%); + color: white; + padding: 20px; + text-align: center; +} \ No newline at end of file