Skip to content

Commit 62b48e5

Browse files
committed
new item
1 parent 7f7351e commit 62b48e5

File tree

7 files changed

+57
-1
lines changed

7 files changed

+57
-1
lines changed

public/screenshots/1.png

485 KB
Loading

public/screenshots/2.png

659 KB
Loading

public/screenshots/3.png

573 KB
Loading

public/screenshots/4.png

692 KB
Loading

public/screenshots/image.png

2 MB
Loading

src/components/TraceCarousel.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,13 @@ export default function TraceCarousel({
100100

101101
if (isAutoPlaying && traceDatas.length > 1) {
102102
interval = setInterval(() => {
103-
nextTrace();
103+
// Check if any video is currently playing before switching
104+
const videoElements = document.querySelectorAll('video');
105+
const isAnyVideoPlaying = Array.from(videoElements).some(video => !video.paused);
106+
107+
if (!isAnyVideoPlaying) {
108+
nextTrace();
109+
}
104110
}, autoplayInterval);
105111
}
106112

@@ -109,6 +115,7 @@ export default function TraceCarousel({
109115
};
110116
}, [isAutoPlaying, activeIndex, traceDatas.length, autoplayInterval]);
111117

118+
// Remove the video play/pause event listeners since we don't need them anymore
112119
// Clean up autoplay timer on unmount
113120
useEffect(() => {
114121
return () => {

src/data/trace6.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"task":"Please search the time of the first playoff game between the Clippers and Nuggets in the 2025 season and add a new event to the calendar.",
3+
"items": [
4+
{
5+
"timestamp": "2024-03-20T10:00:00Z",
6+
"screenshot": "/screenshots/1.png",
7+
"thought": "Need to search for the date and time of first playoff game between Clippers and Nuggets in the 2025 season. Start by searching on Google.",
8+
"action": "Search for 'Clippers Nuggets first playoff game 2025 date and time' in Google",
9+
"video": "https://cua-video-1343655088.cos.ap-hongkong.myqcloud.com/videos%2Fliuyang1_clear.mp4",
10+
"timeRange": {
11+
"start": 0,
12+
"end": 2
13+
}
14+
},
15+
{
16+
"timestamp": "2024-03-20T10:02:30Z",
17+
"screenshot": "/screenshots/2.png",
18+
"thought": "Through analyzing screen elements and text content, I determine that the first playoff game between the Clippers and Nuggets in the 2025 NBA season is scheduled for April 19 at 3:30 PM Eastern Time.",
19+
"action": "extract content",
20+
"video": "https://cua-video-1343655088.cos.ap-hongkong.myqcloud.com/videos%2Fliuyang1_clear.mp4",
21+
"timeRange": {
22+
"start": 2,
23+
"end": 10
24+
}
25+
},
26+
{
27+
"timestamp": "2024-03-20T10:05:15Z",
28+
"screenshot": "/screenshots/3.png",
29+
"thought": "Current task is to add a new event titled 'Clippers vs Nuggets Playoff Game 1' on April 19, 2025, at 3:30 PM ET.",
30+
"action": "click the element",
31+
"video": "https://cua-video-1343655088.cos.ap-hongkong.myqcloud.com/videos%2Fliuyang1_clear.mp4",
32+
"timeRange": {
33+
"start": 10,
34+
"end": 12
35+
}
36+
},
37+
{
38+
"timestamp": "2024-03-20T10:05:15Z",
39+
"screenshot": "/screenshots/4.png",
40+
"thought": "I have successfully reached the date April 19, 2025. The next step is to create the event.",
41+
"action": "click on the button",
42+
"video": "https://cua-video-1343655088.cos.ap-hongkong.myqcloud.com/videos%2Fliuyang1_clear.mp4",
43+
"timeRange": {
44+
"start": 12,
45+
"end": 16
46+
}
47+
}
48+
]
49+
}

0 commit comments

Comments
 (0)