# Unable to display self video with Angular

**URL:** <https://devforum.zoom.us/t/unable-to-display-self-video-with-angular/59851>\
**Category:** Web\
**Created:** [November 5, 2021, 1:53pm UTC](https://devforum.zoom.us/t/unable-to-display-self-video-with-angular/59851 "2021-11-05T13:53:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ALanois](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alanois/32/33827_2.png) [@ALanois](https://devforum.zoom.us/u/ALanois)\
**Post date:** [November 5, 2021, 1:53pm UTC](https://devforum.zoom.us/t/unable-to-display-self-video-with-angular/59851/1 "2021-11-05T13:53:40Z")

</div>

Hi,  
I’m trying to integrate the Zoom video SDK in my Angular app.  
I turned the purejs demo into Angular to run the SDK in my app.  
I have two Canvas :

- One to display my own video
- One to display participants video

The video from participants is well displayed in the targeted canvas but my video is not visible in the other one while other participants can see mine.  
I tried to add the following in index.html, but this not solved the issue :  
`<meta http-equiv="origin-trial" content="TOKEN">`

Then I tried to add in my angular.json :

```auto
"headers": {
  "Cross-Origin-Opener-Policy":"same-origin",
  "Cross-Origin-Embedder-Policy":"require-corp"
}

```

But that still doesn’t solve the problem

Any idea ?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [November 5, 2021, 11:05pm UTC](https://devforum.zoom.us/t/unable-to-display-self-video-with-angular/59851/2 "2021-11-05T23:05:11Z")

</div>

Hey @ALanois ,

Checkout my reply to you here:

> [@Unable to display self video Angular](https://devforum.zoom.us/t/unable-to-display-self-video-angular/59854/2):
>
> Hey @ALanois , What happens when you run typeof SharedArrayBuffer ==='function' in the browser console? Thanks, Tommy

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![ALanois](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alanois/32/33827_2.png) [@ALanois](https://devforum.zoom.us/u/ALanois)\
**Post date:** [November 8, 2021, 4:35pm UTC](https://devforum.zoom.us/t/unable-to-display-self-video-with-angular/59851/3 "2021-11-08T16:35:31Z")

</div>

Hello,  
It return true

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [November 8, 2021, 6:07pm UTC](https://devforum.zoom.us/t/unable-to-display-self-video-with-angular/59851/4 "2021-11-08T18:07:27Z")

</div>

Thanks @ALanois .

Can you please share screenshots and code snippets of the issue? We can assist further if you give us some more details and steps to reproduce. 🙂

-Tommy

---

<div class="post-metadata">

**Author:** ![ALanois](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alanois/32/33827_2.png) [@ALanois](https://devforum.zoom.us/u/ALanois)\
**Post date:** [November 9, 2021, 8:28am UTC](https://devforum.zoom.us/t/unable-to-display-self-video-with-angular/59851/5 "2021-11-09T08:28:26Z")

</div>

It seems that I can’t add media file in reply so I’ll describe the content 😅  
I have my two Canvas with one supposed to contain my video (blank) and one with participant video (filled).  
In my console :

- [Deprecation] SharedArrayBuffer will require cross-origin isolation as of M92, around July 2021. See for more details.
- typeof SharedArrayBuffer ===‘function’  
true

And parts of the code :

```auto
this.meCanvas = document.getElementById('me-canvas');
await this.zoomCli.join('VideoSDK', sessionToken, 'User', '1234ABC');
this.myId = this.zoomCli.getSessionInfo().userId;

private async toggleSelfVideo(isVideoOn){
        if (typeof this.isStartedVideo !== 'boolean' || this.prevIsSelfVideoOn === isVideoOn) {
            return;
        }
        if (isVideoOn) {
            await this.mediaStream.startVideo();
            await this.mediaStream.renderVideo(
                this.meCanvas,
                this.myId,
                1280 / 2,
                640,
                1280 / 2,
                0,
                2,
            ); 
            
        } else {
            await this.mediaStream.stopVideo();
            await this.mediaStream.stopRenderVideo(this.meCanvas, this.zoomCli.getSessionInfo().userId);
            await this.mediaStream.clearVideoCanvas(this.meCanvas);
        }
        this.prevIsSelfVideoOn = isVideoOn;
    }

```

```auto
<canvas id="me-canvas" class="video-canvas" width="640" height="320"></canvas>

```

By the way, when I add the token, participant’s video is not centered anymore.

Thanks by advance

---

<div class="post-metadata">

**Author:** ![bradleywillis891](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bradleywillis891/32/32566_2.png) [@bradleywillis891](https://devforum.zoom.us/u/bradleywillis891)\
**Post date:** [November 11, 2021, 11:30am UTC](https://devforum.zoom.us/t/unable-to-display-self-video-with-angular/59851/6 "2021-11-11T11:30:51Z")

</div>

still not working for me…!!!

---

<div class="post-metadata">

**Author:** ![ALanois](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alanois/32/33827_2.png) [@ALanois](https://devforum.zoom.us/u/ALanois)\
**Post date:** [November 16, 2021, 10:09am UTC](https://devforum.zoom.us/t/unable-to-display-self-video-with-angular/59851/7 "2021-11-16T10:09:14Z")

</div>

I solved the issue.  
In fact the problems were the dimensions sent in parameters of renderVideo which were to high compared to the canvas’s dimension.  
But we still need to add the tag with the token.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [November 23, 2021, 11:12pm UTC](https://devforum.zoom.us/t/unable-to-display-self-video-with-angular/59851/8 "2021-11-23T23:12:02Z")

</div>

Thanks for sharing your solution @ALanois . 🙂

@bradleywillis891 , can you share some more details about the issue you are experiencing?

-Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [December 24, 2021, 9:12am UTC](https://devforum.zoom.us/t/unable-to-display-self-video-with-angular/59851/9 "2021-12-24T09:12:16Z")

</div>

Closed on December 24, 2021, 9:12am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
