alezanai / kvs-parser

Kinesis Video Stream Parser Library in Node.js
GNU General Public License v3.0
3 stars 1 forks source link

Implement kvs-parser #6

Closed piercus closed 2 years ago

piercus commented 2 years ago

Actual

unit test implemented, but function is still empty

Expected

Implement the lib/kvs-parser.js file

dharmik-dalwadi-seaflux commented 2 years ago

Hello @piercus To implement the kvs-parser do we need to use the mock data or actual AWS getMedia() api?

piercus commented 2 years ago

@dharmik-dalwadi-seaflux it depends what "to use" means

Short answer

You will implement aws-sdk usage into lib/kvs-parser.js as default usage But when testing your implementation, you will always call ava test/kvs-parser.js and then test it passing through the mock

Long answer

you should do the following :

const AWS = require('aws-sdk')

// inside the constructor 
this.kinesisvideo = awsInstances.kinesisvideo || new AWS.KinesisVideo();
this.kinesisvideomedia = awsInstances.kinesisvideomedia || new AWS.KinesisVideoMedia();