wex5+ Hai Kang camera +cordova package for NVR docking video online monitoring

Source: Internet
Author: User
Tags port number

Previous write streaming video docking way to achieve online monitoring camera, this time in writing NVR docking

A Development preparation

1.WEX5 Development Tools

2.Eclipse Development Tools

3.Android stdio Development Tools

Description: Eclipse is used to run the demo of the Hai Kang video surveillance and simplify it; the WEX5 development tool is used to package the project build Apk;android Stdio to run the generated build project and debug the encapsulated plug-in.

Two Simplified Android Source code

To facilitate encapsulation into Cordova plug-ins, remove all layout files from the native end and create a linear layout and Surfaceview in the startup page with code

In OnCreate, accept the passed parameters, implement automatic login in the page creation method and call the single play method, and call the Logout method in the page destroy method.

1. Liaocheng flood-control mobile NVR Video docking parameters: IP, port number, user name, password, channel number.

2. Jinan, Changle flood control mobile end streaming video docking parameters: IP, user name, password, video encoding.

Three Encapsulated Cordova Plug-in

3.1 Jinan flood control streaming video docking mode Cordova plug-in package

3.1.1 New Cordova Directory


3.1.2 Copies the directory to the Native/plugins directory in Wex5, which is displayed when it is packaged.


3.1.3. Plugin.xml configuration instructions in the catalog file

When you do it for the first time, you can copy a modified package name and method name with reference to Voicemanager.


In this configuration file, special attention is paid to the startup page configuration and the. So type of jar package configuration, which should be clearly understood. So-type jar packages typically have two directories in the Android directory


The class one in the native page must be fully configured


3.1.4. Methods for invoking native pages in Video.js


3.1.5. This is the realization of your native idea of the page, go to this page to show that you encapsulated the native code success, I am on this page to achieve the data transfer and page jump, Myliveactivitynoxml.java page is to implement video monitoring of the true native page

3.2 Liaocheng flood control NVR Video docking mode Cordova plug-in package

Package steps similar to 3.1

Four Project Integration

Packaging, Jinan flood control streaming video docking Check the first plug-in, Liaocheng flood control NVR Video docking Check the second plug-in can be.

Five Plug-in invocation mode

Jinan flood Control streaming video docking call mode: Videomanager.setplaymode (IP, user name, password, video encoding, success,fail);

Liaocheng flood Control NVR Video docking call mode:

Videomanager.setplaymode (IP, port number, user name, password, channel number, success, fail);

NVR Docking Successful Demo:



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.