0.1.2 • Published 3 years ago

zego-external-camera-plugin v0.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

zego-external-camera-plugin

Prerequisites

  1. Electron 5.0.8+

Installation

npm install zego-external-camera-plugin

Quick Start

* import
	* const zgExtCamera = window.require('zego-external-camera-plugin/ZegoExternalCamera');
	
* init
	* zgExtCamera.CreateExternalCamera();
	
* set device
	* zgExtCamera.UseCameraDevice("device_id");
	
* set parameters
	* zgExtCamera.SetCaptureFPS(fps);
	* zgExtCamera.SetCaptureResolution(width, height);
	
* start capture
	* zgExtCamera.StartCapture();
	
* publish
	* zgEngine.enableCustomVideoCapture(true, channel); 【引擎打开自定义视频采集】
	* var plugin = zgExtCamera.GetCustomVideoCapturePlugin();
	* zgEngine.registerCustomVideoCapturePlugin(plugin, channel);【引擎注册该插件到允许自定义视频采集的频道】
	
* uninit
	* var plugin = zgExtCamera.GetCustomVideoCapturePlugin();
	* zgEngine.unregisterCustomVideoCapturePlugin(plugin);
	* zgExtCamera.StopCapture();
	* zgExtCamera.DestroyExternalCamera();

ChangeLog

0.1.0

ADD:

  • add plugin zego-external-camera-plugin