Spaces:
Paused
Paused
Bhabananda Das commited on
Commit ·
48eee6d
1
Parent(s): 3c102a7
fff
Browse files- src/pages/video/Video.jsx +10 -6
src/pages/video/Video.jsx
CHANGED
|
@@ -147,9 +147,10 @@ const Video = () => {
|
|
| 147 |
<iframe
|
| 148 |
width={"100%"}
|
| 149 |
height={"100%"}
|
| 150 |
-
src={`https://www.youtube.com/embed/${videoId}`}
|
| 151 |
title="YouTube video player"
|
| 152 |
frameBorder="0"
|
|
|
|
| 153 |
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
| 154 |
allowFullScreen
|
| 155 |
></iframe>
|
|
@@ -211,11 +212,14 @@ const VideoDetails = ({ videoDetails, channelDetails }) => {
|
|
| 211 |
const [showMore, setShowMore] = useState(false);
|
| 212 |
const linkRegex = /(https?:\/\/[^\s]+)/g;
|
| 213 |
const handleStream = () => {
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
|
|
|
|
|
|
|
|
|
| 219 |
};
|
| 220 |
return (
|
| 221 |
<>
|
|
|
|
| 147 |
<iframe
|
| 148 |
width={"100%"}
|
| 149 |
height={"100%"}
|
| 150 |
+
src={`https://www.youtube.com/embed/${videoId}?autoplay=1`}
|
| 151 |
title="YouTube video player"
|
| 152 |
frameBorder="0"
|
| 153 |
+
|
| 154 |
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
| 155 |
allowFullScreen
|
| 156 |
></iframe>
|
|
|
|
| 212 |
const [showMore, setShowMore] = useState(false);
|
| 213 |
const linkRegex = /(https?:\/\/[^\s]+)/g;
|
| 214 |
const handleStream = () => {
|
| 215 |
+
|
| 216 |
+
if (window.Telegram){
|
| 217 |
+
const tg = window.Telegram;
|
| 218 |
+
tg.ready();
|
| 219 |
+
const data = { message: "Hello from WebApp!" };
|
| 220 |
+
tg.sendData(JSON.stringify(data));
|
| 221 |
+
console.log("click on stream")
|
| 222 |
+
}
|
| 223 |
};
|
| 224 |
return (
|
| 225 |
<>
|