Application Programming Interfaces
viinex is designed as an SDK, so programming interfaces are of most importance for us.
viinex APIs come in three flavors.
First of all, there is an API for remote clients. This is perhaps the most important one. Remote clients include web pages (including single page web apps), mobile applications, and services. For all these use cases viinex’ API is available via HTTP and via WAMP.
HTTP transport for remote calls is commonly used, it is convenient in many aspects. viinex objects each expose endpoints which can be accessed over HTTP, when an object gets published in viinex web server. In detail http API is described in chapter 3 of our documentation.
However HTTP is not the only option. There’s another protocol called WAMP. If you’re unfamiliar with it — please refer to wamp-proto.org. It is a routed RPC solution, well suitable for real world Internet. One possible transport for WAMP is WebSocket. WAMP clients can register themselves on a special component, called WAMP router, and by doing so they make themselves available for RPC invocations. At the same time, clients can invoke remote procedures on other clients registered with the same WAMP router. viinex makes use of this: besides HTTP transport, it also can expose the API via WAMP. What’s especially good about it is that even when a viinex instance resides behind the NAT, — it still can be reached, if it has registered itself in a WAMP router on the internet. Together with WebRTC for media streaming, this makes viinex suitable for deployment in p2p scenarios, without the need for a VPN or setting up port forwarding.
viinex exposes over WAMP the same functionality as is exposed over HTTP.
Last but not least, there is also a lower-level API available with viinex to implement custom media sources, codecs, as well as connect to viinex’ local instance to implement video analytics. This API is made available as an open-source component called vnxvideo, see this GitHub repo.