Spaces:
Running
Running
Update movie.html
Browse files- movie.html +36 -3
movie.html
CHANGED
@@ -124,6 +124,7 @@
|
|
124 |
font-weight: bold;
|
125 |
margin-top: 20px;
|
126 |
transition: background-color 0.3s;
|
|
|
127 |
}
|
128 |
|
129 |
.watch-button:hover {
|
@@ -148,6 +149,31 @@
|
|
148 |
transform: scale(1.05);
|
149 |
}
|
150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
@media (max-width: 768px) {
|
152 |
.movie-details {
|
153 |
grid-template-columns: 1fr;
|
@@ -179,6 +205,11 @@
|
|
179 |
|
180 |
<div class="container">
|
181 |
<div id="movieContent"></div>
|
|
|
|
|
|
|
|
|
|
|
182 |
</div>
|
183 |
|
184 |
<script>
|
@@ -207,7 +238,11 @@
|
|
207 |
|
208 |
function displayMovieDetails(movie, credits, images) {
|
209 |
const content = document.getElementById('movieContent');
|
|
|
210 |
|
|
|
|
|
|
|
211 |
const revenue = new Intl.NumberFormat('en-US', {
|
212 |
style: 'currency',
|
213 |
currency: 'USD'
|
@@ -224,9 +259,7 @@
|
|
224 |
<img src="https://image.tmdb.org/t/p/w500${movie.poster_path}"
|
225 |
alt="${movie.title}"
|
226 |
onerror="this.src='https://via.placeholder.com/500x750?text=No+Poster'">
|
227 |
-
<a href="
|
228 |
-
target="_blank"
|
229 |
-
class="watch-button">Watch Movie</a>
|
230 |
</div>
|
231 |
<div class="info">
|
232 |
<h2>${movie.title}</h2>
|
|
|
124 |
font-weight: bold;
|
125 |
margin-top: 20px;
|
126 |
transition: background-color 0.3s;
|
127 |
+
cursor: pointer;
|
128 |
}
|
129 |
|
130 |
.watch-button:hover {
|
|
|
149 |
transform: scale(1.05);
|
150 |
}
|
151 |
|
152 |
+
.video-container {
|
153 |
+
margin-top: 50px;
|
154 |
+
padding: 20px;
|
155 |
+
background-color: #000;
|
156 |
+
border-radius: 10px;
|
157 |
+
}
|
158 |
+
|
159 |
+
.video-wrapper {
|
160 |
+
position: relative;
|
161 |
+
padding-bottom: 56.25%; /* 16:9 aspect ratio */
|
162 |
+
height: 0;
|
163 |
+
overflow: hidden;
|
164 |
+
max-width: 100%;
|
165 |
+
border-radius: 8px;
|
166 |
+
}
|
167 |
+
|
168 |
+
.video-wrapper iframe {
|
169 |
+
position: absolute;
|
170 |
+
top: 0;
|
171 |
+
left: 0;
|
172 |
+
width: 100%;
|
173 |
+
height: 100%;
|
174 |
+
border: none;
|
175 |
+
}
|
176 |
+
|
177 |
@media (max-width: 768px) {
|
178 |
.movie-details {
|
179 |
grid-template-columns: 1fr;
|
|
|
205 |
|
206 |
<div class="container">
|
207 |
<div id="movieContent"></div>
|
208 |
+
<div class="video-container" id="moviePlayer">
|
209 |
+
<div class="video-wrapper">
|
210 |
+
<iframe id="movieFrame" allowfullscreen></iframe>
|
211 |
+
</div>
|
212 |
+
</div>
|
213 |
</div>
|
214 |
|
215 |
<script>
|
|
|
238 |
|
239 |
function displayMovieDetails(movie, credits, images) {
|
240 |
const content = document.getElementById('movieContent');
|
241 |
+
const movieFrame = document.getElementById('movieFrame');
|
242 |
|
243 |
+
// Set up the video player
|
244 |
+
movieFrame.src = `https://vidsrc.in/embed/movie/${movie.id}`;
|
245 |
+
|
246 |
const revenue = new Intl.NumberFormat('en-US', {
|
247 |
style: 'currency',
|
248 |
currency: 'USD'
|
|
|
259 |
<img src="https://image.tmdb.org/t/p/w500${movie.poster_path}"
|
260 |
alt="${movie.title}"
|
261 |
onerror="this.src='https://via.placeholder.com/500x750?text=No+Poster'">
|
262 |
+
<a href="#moviePlayer" class="watch-button">Watch Movie</a>
|
|
|
|
|
263 |
</div>
|
264 |
<div class="info">
|
265 |
<h2>${movie.title}</h2>
|