A method of controlling accessible browser functions of a physical side of a remote or virtual desktop environment, said method comprising steps of: - setting up a virtual desktop infrastructure between a physical unit of a user, on said physical side, and a virtual unit assigned to said user, on a virtual or remote side; - running a first web browser at the physical unit and a second web browser at the virtual unit, - wherein a WebRDS application runs in the first web browser at the physical unit that in turn comprises a WebRTC Media Engine, and wherein a WebRTC application runs on the second web browser at the virtual unit and includes a WebSocket client and a data channel DC client; - establishing a WebRTC data channel between the first WebRTC media engine enabled and assigned to a first data channel API implemented in said first web browser running at the physical unit and a second WebRTC media engine enabled and assigned to a second data channel API implemented in said second web browser running at the virtual unit wherein the WebRTC data channel further is established between the DC Client of the WebRTC application at the side of the virtual unit and a DC server of a head-less WebRTC extension HWE implemented in the WebRDS App at the side of the physical unit for controlling a first local device API or a peer connection API of the physical unit, which are used to capture or replay media from or via the corresponding local devices, via the WebRTC data channel through the HWE at the physical unit remotely on behalf of the virtual unit APIs in concerned RDS and VDI environments, and wherein the peer connection API utilizes said WebRTC data channel established between the physical unit and the virtual unit invoking the corresponding WebRTC protocols establishing a real-time data connection from the physical unit to a third party on behalf of the virtual unit. - setting up a virtual desktop infrastructure between a physical unit of a user, on said physical side, and a virtual unit assigned to said user, on a virtual or remote side; - running a first web browser at the physical unit and a second web browser at the virtual unit, - wherein a WebRDS application runs in the first web browser at the physical unit that in turn comprises a WebRTC Media Engine, and wherein a WebRTC application runs on the second web browser at the virtual unit and includes a WebSocket client and a data channel DC client; - establishing a WebRTC data channel between the first WebRTC media engine enabled and assigned to a first data channel API implemented in said first web browser running at the physical unit and a second WebRTC media engine enabled and assigned to a second data channel API implemented in said second web browser running at the virtual unit wherein the WebRTC data channel further is established between the DC Client of the WebRTC application at the side of the virtual unit and a DC server of a head-less WebRTC extension HWE implemented in the WebRDS App at the side of the physical unit for controlling a first local device API or a peer connection API of the physical unit, which are used to capture or replay media from or via the corresponding local devices, via the WebRTC data channel through the HWE at the physical unit remotely on behalf of the virtual unit APIs in concerned RDS and VDI environments, and