Hi, I have a serious problem with html elements and I hope somebody can help me. I use an external API in actions where I have methods that I need to send html element, div.
Here is the full issue, I use a webRTC library API and I need to send local and remote video containers, basically just div elments for video call, to some method which exist in actions file, but I have these div elements in one of the components. Just sending them as parameters did not worked for the methods.
2 possible solutions come to my mind, but none of them worked yet
-
Either send div from component to action via commit or dispath as parameter
-
Access div from actions via some Dom7 method
Here is the code I trred so far for the first method but did not work
code
videoCall () {
let options = [{key: 'localVideoContainer', value: document.getElementById('localVideoContainer')},
{
key: 'remoteVideoContainer', value: document.getElementById('remoteVideoContainer')
}]
this.SET_CALL_OPTIONS(options)
this.$store.dispatch('call');
}
this.callingButtons.videoCall = !this.callingButtons.videoCall
},
css
#localVideoContainer, #remoteVideoContainer{
height: 200px;
}
Here is a snapshot what I get in store, div as parameter