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

vertinho

v0.3.0

Published

Library to make conference apps and softphones through WebSockets with FreeSWITCH mod_verto.

Downloads

28

Readme

Vertinho

Library to make conference apps and softphones through WebSockets with FreeSWITCH mod_verto.

Available on NPM: https://www.npmjs.com/package/vertinho

Tutorial

Soon. when it becomes stable and testable enough.

Licensing

The original Verto JS was written first depending of JQuery (and that's still the official version supported by FreeSWITCH team). It was made by Anthony Minessale II who copyrights it as Verto initial developer and created its backend code. Later, my friend Stefan Yohansson remade it without JQuery. Also were part of it Seven Du and Xueyun Jiang as contributors too and by extension the whole community. Until then, the code was under MPL 1.1.

However, I'm releasing Vertinho under MPL 2.0 (an upgrade explicitly allowed by the first license), a strong copyleft license compatible with GNU ones.

Asking why rewrite what was already "good and running"?

This is an indie fork of the original Verto JQuery, but it's not a pointless refactoring. Here are dozens of reasons if you're interested to know.

It's almost five years, frontend world had changed a lot, JS tools like JQuery are currently ephemeral. And one of my goals here is to help the FreeSWITCH community to follow the current JavaScript's state of the art.

So I'm specifically working on top of some problems that I encountered while coding with old Verto in the past months contributing for its core and fixing bugs of private forks. Disclaimer: I don't need to reveal closed source customizations or ideas here. People only break Verto because it's hard to understand how it works and how it's architetured. It's easier to make workarounds, patchs, adapters, shim layers... anything.

Here is what I intent to fix with Vertinho:

  • It has static and outdated dependencies managed by manual "copy and paste":
    • like the JQuery itself or the WebRTC Adapter;
    • deprecated WebRTC API functions (like RTCPeerConnection.addStream which is now totally deprecated);
    • outdated WebRTC API usage (like MediaDevices.getUserMedia and RTCPeerConnection.createOffer that should be consumed using their Promise-based forms instead of passing callbacks as arguments).
  • The library itself is not that good to be used as a dependency for others:
    • versioning is inexistent, depending entirely of FreeSWITCH releases;
    • no easily accessible changelogs;
    • almost an abandoned support of it on NPM package manager;
    • documentation consists only of a few examples that doesn't cover the entire API, since the people who wrote it aren't the same that developed it;
    • very redundant API (having more than one or two ways to change instance properties is confusing, specially when there are divergencies between them);
    • poorly parsed objects exposed (if you consume some of LiveArray messages, for example, you need to handle serialised JSON strings inside JS objects in arrays of unnamed data, which is more confusing than read this description);
    • bad error handling and messaging (for example, exceptions occured on a getUserMedia are always considered permission errors, which is not always true),
    • some ambiguous and implicit variable naming on exposed API (like res, e and pvt variables).
  • Has too much responsibilities like manipulating the DOM:
    • most of JS UI libraries currently use Virtual DOM, then having Verto changing the DOM directly (like putting MediaStream into nodes from getElementById) could have been convenient in older days but today is just anti-pattern, causing conflicts and not helping that much;
    • having the library implicitly changing the UI style properties (like display to block or none) reduces the client developers control over their own applications.
  • Lack of automated tests, making people afraid of changing code for paying technical debt or developing cutting edge features.
  • Repository not in the same place as the majority of other JS libraries (i.e., GitHub), so is a less accessible for real frontend developers.
  • License toxic for free source projects (old MPL is not GNU compatible).
  • Difficult to debug issues on its core development:
    • great amount of side effects on the provided arguments (like the option useCamera being mutated from a string type into a document element);
    • a few side effects on internal methods (e.g., an inner getUserMedia that, despite being a getter, also acts as a setter and manipulates DOM);
    • weak transparency usage for parameters provided (e.g., useCamera is an unnecessary abstraction to browsers deviceId constraint);
    • a lot of unused variables and parameters;
    • greatly messed up indentation.

Seriously, why? Rewriting Verto JS helps me to study deeper how all of it works. I couldn't learn nor work with it properly if it's just black magic, accordingly with Clark's third law.

Also, I came from a land where simple is better than complex: