So i made this app so i can play movies from my laptop on my telephone and that i made it begin the video from when i closed it. It is working superb on chrome (laptop) however on my telephone (iOS 16) it begins from the start and the search bar isn’t even working
fetch("/progress", { keepalive: false })
.then((response) => response.json())
.then((json) => {
for (var x = 0; x < playlist.size; x++) {
if (playlist[x].identify === json.now_playing) {
vidNow = x;
vidPlay(vidNow, true);
video.currentTime = json.current_duration
vSeek.worth = json.current_duration
}
}
if (vidNow == 0) vidPlay(0, true);
});
var vidStart = true,
vidPlay = (idx, nostart) => {
vidNow = idx;
vidStart = nostart ? false : true;
video.src = encodeURI(playlist[idx]["src"]);
for (let i in playlist) {
if (i == idx) {
playlist[i]["row"].classList.add("now");
} else {
playlist[i]["row"].classList.take away("now");
}
}
};```