Hi fellows,
I’m having an odd issue with the video player I have integrated in playcanvas using js to create video tag:
following is my js code:
var Element;
Element= document.createElement('div');
Element.style.opacity=0.0;
Element.classList.add('container');
document.body.appendChild(Element);
var Video;
Video = document.createElement('video');
Video.setAttribute('id', 'VideoTag'); // assign an id
Video.setAttribute('poster', SelectedPoster); // assign a poster
Video.src = SelectedURL; //the url to stream
Video.seeking=true;
Video.crossOrigin = 'anonymous';
Video.preload = true;
Video.load();
Video.controls = true;
Element.appendChild(Video);
The css im using is:
.container {
position: absolute;
min-width: 60%;
max-height: auto;
width: auto;
height: auto;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
}
#VideoTag{
width: 100%;
height: auto;
}
Issue:
when video plays, I touch the inside and outside the video frequently, sometimes the background UI turn black. I have confirmed the buttons are there but are not visible.But don’t know why this is happening.
Background UI are textures for now but I have also tried sprites but same issue was seen.
Can you please help me out for the following issue (only occuring on andriod so far) (video of the issue):
https://drive.google.com/file/d/16y23dnXMV1iWDhixTOm-yaCduW-BUYas/view?usp=sharing
Thanks in advance.