# videoElementCreated

**URL:** <https://openvidu.discourse.group/t/videoelementcreated/1239>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [June 20, 2020, 11:21am UTC](https://openvidu.discourse.group/t/videoelementcreated/1239 "2020-06-20T11:21:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alireza](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@Alireza](https://openvidu.discourse.group/u/Alireza)\
**Post date:** [June 20, 2020, 11:21am UTC](https://openvidu.discourse.group/t/videoelementcreated/1239/1 "2020-06-20T11:21:53Z")

</div>

Hi!  
I’m using vue.js (vue/cli 4.4.4)  
openVidu version (2.14.0)

sometimes this part of code never run:

publisher.on(‘videoElementCreated’, (event) =\> { …}

so video doesn’t publish and participant only subscribe.for example when A and B are in conference,A doesn’t publish video but B does.so A and B have only B in conference.

but most of the times it works properly and A and B both are in conference.

when i inspect in chrome,\<div id=“video-container” has style when everything works fine but when publisher.on(‘videoElementCreated’, (event) =\> { …} doesn’t fire,\<div id=“video-container” has no style.

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [June 22, 2020, 9:10am UTC](https://openvidu.discourse.group/t/videoelementcreated/1239/2 "2020-06-22T09:10:51Z")

</div>

Sounds like a typical concurrency problem, but we have never seen something like it. I wouldn’t know how to reproduce the issue, so I’m afraid with this little information I cannot help you. I’m not sure if this might be a problem with openvidu-browser library itself, your applciation’s code or even Vue’s particular behavior.

Can you post here a consistent way of replicating the problem?

---

<div class="post-metadata">

**Author:** ![Alireza](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@Alireza](https://openvidu.discourse.group/u/Alireza)\
**Post date:** [June 30, 2020, 12:30pm UTC](https://openvidu.discourse.group/t/videoelementcreated/1239/3 "2020-06-30T12:30:22Z")

</div>

Thanks for reply

I didn’t find the issue.

Is there any way to check if publishers have video or not?

I want to unsubscribe the user who has not video.

---

<div class="post-metadata">

**Author:** ![Alireza](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@Alireza](https://openvidu.discourse.group/u/Alireza)\
**Post date:** [July 5, 2020, 9:04am UTC](https://openvidu.discourse.group/t/videoelementcreated/1239/4 "2020-07-05T09:04:54Z")

</div>

@pabloFuente  
do you have any recommendations?

---

<div class="post-metadata">

**Author:** ![micael.gallego](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/micael.gallego/32/2_2.png) [@micael.gallego](https://openvidu.discourse.group/u/micael.gallego)\
**Post date:** [July 8, 2020, 10:41am UTC](https://openvidu.discourse.group/t/videoelementcreated/1239/5 "2020-07-08T10:41:39Z")

</div>

[https://docs.openvidu.io/en/2.15.0/api/openvidu-browser/classes/stream.html#hasvideo](https://docs.openvidu.io/en/2.15.0/api/openvidu-browser/classes/stream.html#hasvideo)
