Сменить видео js с по подходящему условию if
Возник вопрос, как сменить видео которое производится бекграунд. Есть 5 возможных вариантов, и при каждом варианте должно отображаться свое видео. Часть кода с Html:
<body>
<video autoplay muted loop id="myVideo">
<source type="video/mp4" class="videoWeather" src = video/clear.mp4>
</video>
и JS получаю значение погоды, и при условиях должно показываться свое видео и картинка. Картинка меняется, видео остается неизменимым
let backgroundVideo = document.querySelector(".videoWeather");
meteorSituation = json.weather[0].main;
console.log(meteorSituation);
// meteorSituation = "Snow"
if (meteorSituation === "Clear") {
backgoundImg.src = ` `;
backgroundVideo.src = `video/clear.mp4`;
backgoundImg.src = `img/Clear.png`;
}
if (meteorSituation === "Clouds") {
backgoundImg.src = ` `;
backgroundVideo.src = ` `;
backgroundVideo.src = `video/clouds.mp4`;
backgoundImg.src = `img/Clouds.png`;
}