# Self video on iPhone not mirrored

**URL:** <https://devforum.zoom.us/t/self-video-on-iphone-not-mirrored/116893>\
**Category:** Web\
**Tags:** phone, video-sdk\
**Created:** [September 4, 2024, 8:22am UTC](https://devforum.zoom.us/t/self-video-on-iphone-not-mirrored/116893 "2024-09-04T08:22:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![phuongnv1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/phuongnv1/32/54805_2.png) [@phuongnv1](https://devforum.zoom.us/u/phuongnv1)\
**Post date:** [September 4, 2024, 8:22am UTC](https://devforum.zoom.us/t/self-video-on-iphone-not-mirrored/116893/1 "2024-09-04T08:22:39Z")

</div>

**Description**  
When I start the video with the option `mirrored = true`, my video is not mirrored correctly (when I raise my right hand, the opposite hand appears in the video) on iPhone.  
However, it works fine on other OS (Android, Windows, macOS, iPadOS).

**Browser Console Error**  
No errors appear.

**Which Web Video SDK version?**  
1.11.10

**Device (please complete the following information):**

- Device: iPhone 12
- OS: iOS 17.5.1
- Browser: Safari
- Browser Version: Safari 17.5.1

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [September 5, 2024, 3:17am UTC](https://devforum.zoom.us/t/self-video-on-iphone-not-mirrored/116893/2 "2024-09-05T03:17:08Z")

</div>

Hey @phuongnv1

Thanks for your feedback.

There are some issues with the `mirror` option in the `stream.startVideo` method on certain platforms. Currently, a workaround is to call the `stream.mirrorVideo` method right after the `startVideo` method is resolved.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![phuongnv1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/phuongnv1/32/54805_2.png) [@phuongnv1](https://devforum.zoom.us/u/phuongnv1)\
**Post date:** [September 5, 2024, 8:43am UTC](https://devforum.zoom.us/t/self-video-on-iphone-not-mirrored/116893/3 "2024-09-05T08:43:15Z")

</div>

Key @vic.yang

I tried calling `stream.mirrorVideo` right after `startVideo`. Here is my code:

`await stream.startVideo({cameraId, hd, originalRatio}); stream.mirrorVideo(true);`

I noticed that the result didn’t change.  
Please help me check it.

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [September 5, 2024, 9:06am UTC](https://devforum.zoom.us/t/self-video-on-iphone-not-mirrored/116893/4 "2024-09-05T09:06:09Z")

</div>

Hey @phuongnv1

Sorry for the incorrect guidance. To be precise, `stream.mirrorVideo` should be performed after rendering the self-view.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![phuongnv1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/phuongnv1/32/54805_2.png) [@phuongnv1](https://devforum.zoom.us/u/phuongnv1)\
**Post date:** [September 9, 2024, 4:02am UTC](https://devforum.zoom.us/t/self-video-on-iphone-not-mirrored/116893/5 "2024-09-09T04:02:09Z")

</div>

Hey @vic.yang  
Thank you for your feedback.

I tried running `stream.mirrorVideo` right after `stream.renderVideo` or `stream.attachVideo`. However, I had to delay it by about 200ms for it to work (which doesn’t seem great from a UX perspective).

When I turn off the camera and turn it back on (handling it the same way as above), it seems the `mirrorVideo` function doesn’t work.

I want to ask if, when the user changes position or turns the camera off and back on, do I need to call the `mirrorVideo` function after rendering the self-view.

Another approach is that I want to use CSS **(`transform: scaleX(-1)`** on the `video-player` element) to flip the video, but it doesn’t work.

Thanks  
Phuong

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [September 9, 2024, 10:21am UTC](https://devforum.zoom.us/t/self-video-on-iphone-not-mirrored/116893/6 "2024-09-09T10:21:16Z")

</div>

Hey @phuongnv1

Thanks for your feedback.

> When I turn off the camera and turn it back on (handling it the same way as above), it seems the `mirrorVideo` function doesn’t work.

Perhaps when you detached the video, you also deleted the corresponding video player. So, the next time you attach the video, the video player is a new element, which means the original mirror effect won’t take effect.

> Another approach is that I want to use CSS **(`transform: scaleX(-1)`** on the `video-player` element) to flip the video, but it doesn’t work.

It only takes effect on certain platforms such as iOS. We recommend using `stream. mirrorVideo` method.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![phuongnv1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/phuongnv1/32/54805_2.png) [@phuongnv1](https://devforum.zoom.us/u/phuongnv1)\
**Post date:** [September 17, 2024, 10:07am UTC](https://devforum.zoom.us/t/self-video-on-iphone-not-mirrored/116893/7 "2024-09-17T10:07:26Z")

</div>

Hey @vic.yang

Thanks for your feedback, and sorry for my delayed reply.

> Perhaps when you detached the video, you also deleted the corresponding video player. So, the next time you attach the video, the video player is a new element, which means the original mirror effect won’t take effect.

I think this is not the root cause. When I run mirrorVideo on iPhone, an error is thrown from the SDK.

 ![error](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/8/88b028bd885c5103f7d0a651cb68963da9674a7e.jpeg)

This is my sessionId: hC7qVb4DSBSJQ50CyW4cAA==

Please check for me.

Thanks  
Phuong

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [September 18, 2024, 6:01am UTC](https://devforum.zoom.us/t/self-video-on-iphone-not-mirrored/116893/8 "2024-09-18T06:01:31Z")

</div>

Hey @phuongnv1

Thanks for sharing the session ID with us.

> hC7qVb4DSBSJQ50CyW4cAA==

After analyzing the logs for this session, we identified a known issue: the `loadedmetadata` event for the video tag was not triggered.

> **[HTMLMediaElement: loadedmetadata event - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loadedmetadata_event)**
>
> The loadedmetadata event is fired when the metadata has been loaded.

We rely on this event to determine whether the video can play. Can I confirm whether the self-view also had an issue when this problem occurred? We are continuously looking for ways to fix this issue.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![phuongnv1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/phuongnv1/32/54805_2.png) [@phuongnv1](https://devforum.zoom.us/u/phuongnv1)\
**Post date:** [September 19, 2024, 1:55am UTC](https://devforum.zoom.us/t/self-video-on-iphone-not-mirrored/116893/9 "2024-09-19T01:55:53Z")

</div>

Hey @vic.yang

> Can I confirm whether the self-view also had an issue when this problem occurred?

When this error occurs, I see that the self-video still works normally.

I hope you will have the latest fix for this issue.

Thanks  
Phuong

---

<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:** [October 19, 2024, 11:56am UTC](https://devforum.zoom.us/t/self-video-on-iphone-not-mirrored/116893/10 "2024-10-19T11:56:44Z")

</div>

Closed on October 19, 2024, 11:56am UTC

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