|
@@ -9,13 +9,11 @@ const VideoAds = ({ video_url, height, width }) => {
|
9
|
9
|
|
10
|
10
|
useEffect(() => {
|
11
|
11
|
if (videoRef.current) {
|
12
|
|
-
|
|
12
|
+
|
13
|
13
|
videoRef.current.muted = true; // Ensure video starts muted for autoplay
|
14
|
|
- setTimeout(() => {
|
15
|
|
- videoRef.current.play().catch((err) => {
|
16
|
|
- console.warn('Autoplay failed:', err);
|
17
|
|
- });
|
18
|
|
- }, 1000);
|
|
14
|
+ videoRef.current.play().catch((err) => {
|
|
15
|
+ console.warn('Autoplay failed:', err);
|
|
16
|
+ });
|
19
|
17
|
}
|
20
|
18
|
}, []);
|
21
|
19
|
|
|
@@ -44,7 +42,7 @@ const VideoAds = ({ video_url, height, width }) => {
|
44
|
42
|
<video
|
45
|
43
|
ref={videoRef}
|
46
|
44
|
src={video_url || videoAds}
|
47
|
|
- autoPlay
|
|
45
|
+ autoplay
|
48
|
46
|
loop
|
49
|
47
|
muted={isMuted}
|
50
|
48
|
playsInline
|