npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nativescript-sinch

v1.1.5

Published

NativeScript plugin to use sinch

Downloads

28

Readme

#NativeScript-Sinch ##WIP

##Install Note : If the android platform is not added before installing this plugin the installation will fail.

tns platform add android 
tns plugin add nativescript-sinch
var sinch = require('nativescript-sinch');

//or

import {Sinch} from 'nativescript-sinch';

Initialize

var sinchClient = new sinch.Sinch("appKey", "appSecret", "host", "username");

//or

let sinchClient  = new Sinch("appKey", "appSecret", "host", "username");

Specify the client capabilities

 sinchClient.setSupportMessaging(true);
 sinchClient.setSupportCalling(true);
 sinchClient.setSupportActiveConnectionInBackground(true);
 sinchClient.setSupportPushNotifications(true);

Start the client

sinchClient.start();

Stop listening for incoming events (calls or messages).

sinchClient.stopListeningOnActiveConnection();

Stop the client when the calling or messaging functionality is no longer needed.

sinchClient.stop();

Get CallClient

sinchClient.getCallClient();

e.g

var callClient = sinchClient.getCallClient();
callClient.callUser("triniwiz");

Methods

addCallClientListener(callClientListener:()=>void)
callConference(conferenceId:string)
callConference(conferenceId,headers:string[])
callPhoneNumber(phoneNumber:string)
callPhoneNumber(phoneNumber:string,headers:string[])
callSip(sipIdentity:string)
callSip(sipIdentity:string,headers:string[])
callUser(toUserId:string)
callUser(toUserId:string,headers:string[])
callUserVideo(toUserId:string)
callUserVideo(toUserId:string,headers:string[])
getCall(callId:string)
removeCallClientListener(callClientListener:()=>void)
setRespectNativeCalls(respectNativeCalls:boolean)

Get MessageClient

sinchClient.getMessageClient();

e.g

var messageClient = sinchClient.getCallClient();

Methods

var message = sinchClient.writableMessage();
var message = sinchClient.writableMessage(["triniwiz","brad","jen","peter"],"Hi");
var message = sinchClient.writableMessage("triniwiz","Sup");
messageClient.send(message);
addMessageClientListener(callback:()=>void);
removeMessageClientListener(callback:()=>void);
send(message:WriteableMessage);

Get VideoController

 sinchClient.getVideoController()
  

e.g

var videoController = sinchClient.getVideoController();
videoController.getCaptureDevicePosition() 
videoController.getLocalView() 
videoController.getRemoteView() 
videoController.setBorderColor(float r, float g, float b)
videoController.setCaptureDevicePosition(int facing)
videoController.setResizeBehaviour(VideoScalingType type)
videoController.toggleCaptureDevicePosition() 

Get AudioController

  sinchClient.getAudioController()

e.g

var audioController = sinchClient.getAudioController();

audioController.mute();
audioController.unmute();
audioController.enableSpeaker();
audioController.disableSpeaker();