I've got a few links on one page (single.php template in Wordpress) that, when clicked, it opens a vr image or video in a lightbox (Fancybox 3). The opening in a lightbox part is working great.
When the player inits, I'm setting the image parameter to show a black image. A user won't ever see this, I only have it there because the parameter has to be there. This is also working fine. So when you click the link, I'm using setContent() to change the image to either a video or a different image, depending on the link clicked. My issue is that I always see the black image that I initiated the player with, it doesn't ever change, and I'm not getting any errors in the console.
The only thing I noticed by using console.log is that the onVRViewReady method is being called once on page load and then again after the link is clicked and setContent() is run. In the docs it says "The types of events on() can register are: ready: VR View loaded its initial contents and is now ready to accept commands.". So maybe because this is running multiple times it's resetting the image parameter to the black image?
Any insight or guesses to a solution would be so incredibly appreciated! Thanks in advance.
I've got a few links on one page (single.php template in Wordpress) that, when clicked, it opens a vr image or video in a lightbox (Fancybox 3). The opening in a lightbox part is working great.
When the player inits, I'm setting the image parameter to show a black image. A user won't ever see this, I only have it there because the parameter has to be there. This is also working fine. So when you click the link, I'm using setContent() to change the image to either a video or a different image, depending on the link clicked. My issue is that I always see the black image that I initiated the player with, it doesn't ever change, and I'm not getting any errors in the console.
The only thing I noticed by using console.log is that the onVRViewReady method is being called once on page load and then again after the link is clicked and setContent() is run. In the docs it says "The types of events on() can register are: ready: VR View loaded its initial contents and is now ready to accept commands.". So maybe because this is running multiple times it's resetting the image parameter to the black image?
Any insight or guesses to a solution would be so incredibly appreciated! Thanks in advance.