I am developing a custom receiver for Chrome Cast. My sender sends me a picture to chromecast, precise positioning this image according to the coordinates sent by the sender.
index.html:
<div id="interacao" class="interacao">
<h1 id="h1texto">Adicione suas mídias pelo celular!</h1>
<video id="vdo"></video>
</div>
manipulacaoElemento.js:
function insertImg(element){
elementoAInserir = document.createElement("img");
elementoAInserir.id = element.idImg;
elementoAInserir.src = element.url;
elementoAInserir.style.width = element.widthImagem +'px';
elementoAInserir.style.height = element.heightImagem +'px';
elementoAInserir.style.left = element.posicao.x+'px';
elementoAInserir.style.top = element.posicao.y+'px';
$('.interacao').html(elementoAInserir);
}
The image is loaded, but not at the position that the sender sent, but instead at the position 0, 0. Could anyone help me solve this problem?