Update app.py
Browse files
app.py
CHANGED
|
@@ -793,11 +793,12 @@ async(c, o, p, d, n, m, s)=>{
|
|
| 793 |
for (var i=0; i<videoDome.videoTexture.video.duration; i++) {
|
| 794 |
document.getElementById('seek').innerHTML += '<a href="#" style="position:absolute;left:'+(56+coords[i].lng/2)+'px;top:'+(56-coords[i].lat/2)+'px;" onclick="seek('+i+');">-'+i+'-</a> ';
|
| 795 |
}
|
|
|
|
| 796 |
const canvas = document.createElement("canvas");
|
| 797 |
canvas.width = video.videoWidth;
|
| 798 |
canvas.height = video.videoHeight;
|
| 799 |
ctx = canvas.getContext("2d", { willReadFrequently: true });
|
| 800 |
-
|
| 801 |
videoPlay();
|
| 802 |
videoDome.videoTexture.video.oncanplaythrough = null;
|
| 803 |
video.oncanplaythrough = null;
|
|
@@ -1334,7 +1335,7 @@ with gr.Blocks(css=css, js=js, head=head) as demo:
|
|
| 1334 |
<a href='#' onclick='snapshot();'>Screenshot</a>
|
| 1335 |
<a href='#' onclick='record_video();'>Record</a>
|
| 1336 |
<a href='#' onclick='stop_recording();'>Stop rec.</a>
|
| 1337 |
-
<a href='#' onclick='
|
| 1338 |
snapshot = gr.HTML(value="""<img src='' id='img_out' onload='var ctxt = document.getElementById(\"cnv_out\").getContext(\"2d\");ctxt.drawImage(this, 0, 0);'/><br/>
|
| 1339 |
<canvas id='cnv_out'></canvas>
|
| 1340 |
<div id='compass_box'><div id='compass'><a id='fullscreen' onclick='
|
|
|
|
| 793 |
for (var i=0; i<videoDome.videoTexture.video.duration; i++) {
|
| 794 |
document.getElementById('seek').innerHTML += '<a href="#" style="position:absolute;left:'+(56+coords[i].lng/2)+'px;top:'+(56-coords[i].lat/2)+'px;" onclick="seek('+i+');">-'+i+'-</a> ';
|
| 795 |
}
|
| 796 |
+
alert(video);
|
| 797 |
const canvas = document.createElement("canvas");
|
| 798 |
canvas.width = video.videoWidth;
|
| 799 |
canvas.height = video.videoHeight;
|
| 800 |
ctx = canvas.getContext("2d", { willReadFrequently: true });
|
| 801 |
+
|
| 802 |
videoPlay();
|
| 803 |
videoDome.videoTexture.video.oncanplaythrough = null;
|
| 804 |
video.oncanplaythrough = null;
|
|
|
|
| 1335 |
<a href='#' onclick='snapshot();'>Screenshot</a>
|
| 1336 |
<a href='#' onclick='record_video();'>Record</a>
|
| 1337 |
<a href='#' onclick='stop_recording();'>Stop rec.</a>
|
| 1338 |
+
<a href='#' onclick='videoPlay();'>Play</a></span>""")
|
| 1339 |
snapshot = gr.HTML(value="""<img src='' id='img_out' onload='var ctxt = document.getElementById(\"cnv_out\").getContext(\"2d\");ctxt.drawImage(this, 0, 0);'/><br/>
|
| 1340 |
<canvas id='cnv_out'></canvas>
|
| 1341 |
<div id='compass_box'><div id='compass'><a id='fullscreen' onclick='
|