Hi, here i have a project that needs to swap two videos.
At first it will play video1 loop , if i press ‘s’ and after video1 finished, it will play video2 loop. if i release ‘s’, after 30 seconds, it will play video1.
it is easy in c++, i can use four status: noPrs, gotoVideo2, playVideo2, gotoVideo1, and write some code like below:
if (status == noPrs) {
play video1
if (btnS) {
status = gotoVideo2;
}
} esle if (status == gotoVideo2) {
play video1
if (video1 end) {
status = playVideo2;
btnS = true;
}
} else if (status == playvideo2) {
play video2;
if (noPrs) {
if (btnS) {
t = now();
} else {
if (now() - t > 30) {
status = noPrs;
}
}
} else {
btnS = true;
}
}
can anyone tell how to implement it into vvvv?