@skywatch/js

1.3.3 • Public • Published

Skwatch JS Library

Installation

Step 1

npm install @skywatch/js

or

yarn add @skywatch/js

Step 2

Option 1:

Use Oauth 2.0 to get access token

Option 2:

Before you start developing, you have to implement Skywatch library on your server. Please follow the guide below to create a POST method url on your server, and then keep the POST method url you generated.

Ex. Implement Skywatch library on node server, and then generate the POST API - https://localhost:3000/skywatch_service_url

Guide:

Skywatch Server Installation Guide

Usage

<script src="https://cdn.jsdelivr.net/npm/@skywatch/js/dist/skywatch.min.js"></script>
<div id="root"></div>
<script>
    const options = {
      autoplay: true,
      muted: true,
      aspectRatio: '16:9',
      mobileView: false,
    };
    Skywatch.initialize('/your_server_url_with_skywatch_library', 'access_token');
    Skywatch.ArchivesPlayer(
      document.getElementById('root'),
      'device_id',
      'archiveId',
      'smart_ff',
      'seek',
      'options',
    ).then(player => {
      //do something
    });
</script>

API Document

Camera API Usage

Lock API Usage

User API Usage

License

  • This project is inspired by video.js.
  • This project is inspired by flv.js.
  • Licensed under the Apache License, Version 2.0 (the "License");

Readme

Keywords

none

Package Sidebar

Install

npm i @skywatch/js

Weekly Downloads

0

Version

1.3.3

License

Apache-2.0

Unpacked Size

8.8 MB

Total Files

19

Last publish

Collaborators

  • ryoko.li
  • adam.lee
  • vince_lee