Hi! I’m trying to use a repeater to display a user-uploaded video or an image from a database. What seems to happen is that the URL gets set to the one in the database and the thumbnail is changed to match that video, however, when you play the video it still shows the default one. In the preview mode, nothing loads, although when published the default video is shown.
Currently, I’m doing all of this through code. Although, I did try hooking up the video player with the “Connect to Database” feature and I got the same results.
Here’s the code I’m using to do this:
import wixData from "wix-data";
$w.onReady(function () {
$w("#dynamicDataset").onReady(() => {
$w("#listRepeater").onItemReady(($item, itemData) => {
$item("#name").text = itemData.firstName + " " + itemData.lastName;
if (itemData.submissionVid) {
$item("#videoPlayer").src = itemData.submissionVid;
$item("#videoPlayer").expand();
} else if (itemData.submissionImg) {
$item("#imageDisplay").src = itemData.submissionImg;
$item("#imageDisplay").expand();
}
});
});
});
Also here’s a sample of the URL being set:
wix:video://v1/b8e6f2_0e981608817a40078988bb3370cca700/City.mp4#posterUri=b8e6f2_0e981608817a40078988bb3370cca700f000.jpg&posterWidth=1280&posterHeight=720
Any ideas on why this is happening? Let me know if you need anything else. Thanks!