@arcware/webrtc-plugin
Advanced tools
Comparing version 0.0.22 to 0.0.23
{ | ||
"name": "@arcware/webrtc-plugin", | ||
"version": "0.0.22", | ||
"version": "0.0.23", | ||
"main": "./webrtc-plugin.umd.js", | ||
@@ -5,0 +5,0 @@ "module": "./webrtc-plugin.esm.js", |
@@ -12,2 +12,22 @@ # Arcware WebRTC Plugin | ||
// Vue template | ||
<div ref="sizeContainer"> | ||
<div ref="videoContainer"> | ||
<video ref="videoRef" /> | ||
</div> | ||
</div>; | ||
// React template | ||
const sizeContainerRef = React.useRef(); | ||
const containerRef = React.useRef(); | ||
const videoRef = React.useRef(); | ||
<div ref={sizeContainerRef}> | ||
<div ref={containerRef}> | ||
<video ref={videoElRef} /> | ||
</div> | ||
</div>; | ||
// Initialize WebRTC | ||
const args = { | ||
@@ -18,12 +38,10 @@ address: "Signalling WS URL", | ||
// --- Containers Options --- | ||
// Vue (with ref="") | ||
// Vue | ||
sizeContainer: this.$refs.sizeContainer, | ||
container: this.$refs.videoContainer, | ||
videoRef: this.$refs.videoRef, | ||
// React (with useRef) | ||
sizeContainer: this.sizeContainer.current, | ||
container: this.videoContainer.current, | ||
// React | ||
sizeContainer: this.sizeContainerRef.current, | ||
container: this.containerRef.current, | ||
videoRef: this.videoRef.current, | ||
// Pure JS/HTML | ||
sizeContainer: "container-id", | ||
// --- --- | ||
@@ -30,0 +48,0 @@ playOverlay: true, // Set default overlay with play button. Make it false and use loader |
606272
61