# Video connection does not work in Safari

**URL:** <https://openvidu.discourse.group/t/video-connection-does-not-work-in-safari/2819>\
**Category:** Issues with deployment\
**Tags:** v2\
**Created:** [March 15, 2021, 6:23am UTC](https://openvidu.discourse.group/t/video-connection-does-not-work-in-safari/2819 "2021-03-15T06:23:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![minki.kim](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/minki.kim/32/961_2.png) [@minki.kim](https://openvidu.discourse.group/u/minki.kim)\
**Post date:** [March 15, 2021, 6:23am UTC](https://openvidu.discourse.group/t/video-connection-does-not-work-in-safari/2819/1 "2021-03-15T06:23:20Z")

</div>

Hi

If your device is rejected in Safari browser  
safari browser only  
Other users’ videos are not linked.

1. safari  

2. opera  

3. chrom  

Spec

- react
- 2.16 openvidu-browser

Source Code  
import React, { useState, useEffect } from “react”;

export const OvVideoComponent = (props) =\> {

```
let videoRef = React.createRef();

useEffect(() => {
    // console.log(props.user);
    // console.log(videoRef);

    if (props && props.user.streamManager && !!videoRef) {
        // if (props.type == "pip") {
        // videoRef.current.defaultMuted = props.mutedSound;
        // videoRef.current.muted = props.mutedSound;
        // }
        props.user.getStreamManager().addVideoElement(videoRef.current);
        
    }
});

return (
    <>
        <video
            autoPlay={true}
            id={'video-' + props.user.getStreamManager().stream.streamId}
            ref={videoRef}
            muted={props.mutedSound}
        />
    </>
);

```

};

export default OvVideoComponent;

---

<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:** [March 15, 2021, 9:18am UTC](https://openvidu.discourse.group/t/video-connection-does-not-work-in-safari/2819/2 "2021-03-15T09:18:12Z")

</div>

Safari has some strict autoplay features for video elements. These restrictions are gone when the page is accessing the mic/camera, that’s why they are playing correctly when the webcam is used by the page. And that’s probably why it is not working the same when not accesing the webcam. You should handle the playing of the video in a way that chaces of successful autoplay are increased. There is lots of information online. For example, take a look at this: [Autoplay Best Practices with Video.js | Video.js Blog](https://blog.videojs.com/autoplay-best-practices-with-video-js/)
