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

com.adrenak.univoice.mirrornetwork

v1.0.0

Published

ChatroomNetwork implementation for UniVoice based on Mirror by vis2k.

Downloads

36

Readme

UniVoice Mirror Network

This repository contains the Mirror based implementation of the IChatroomNetwork interface in UniVoice

Dependencies

[email protected]

The UniVoice version this implementation uses.

[email protected]

A simple byte array reader and writer it uses to send and receive messages

Installation

  1. Ensure the UniVoice package has been imported in your project.
  2. Import this package.
  3. Import Mirror. This package was last tested with Mirror version 87.1.7. The Mirror APIs used don't tend to change much, so breaking changes should be minimal.
  4. Add UNIVOICE_MIRROR to your projects Scripting Define Symbols to enable the UniVoiceMirrorNetwork class.

How it works & how to use

The UniVoiceMirrorNetwork class is incapable of hosting, joining, closing and leaving a chatroom by itself. Tt just listens to and uses your Mirror server/client. At the root of it, it just calls:

  • NetworkServer.SendToAll for the server to broadcast messages to the peers.
  • NetworkClient.Send for the peers to send their audio to the server/host.
  • Connection & Disconnection events of the Client & Server using NetworkManager.single.transport
  • RegisterHandler on NetworkClient and NetworkServer to get messages.

You create a ChatroomAgent with

  1. an instance of UniVoiceMirrorNetwork
  2. the audio output implementation of your choice. You're likely looking for AudioSourceOutput which plays audio using Unity's AudioSource
  3. the factory method of an audio input implementation of your choice. Again, you're likely looking for UniMicInput which uses UniMic, a wrapper over Unity's Microphone class to capture audio from the microphone. This could look like this:
var chatroomAgent = new ChatroomAgent (
    new UniVoiceMirrorNetwork(),
    new UniVoiceUniMicInput(0, 8000, 50),
    new UniVoiceAudioSourceOutput.Factory()
);

That's it! When you create of join a server/host using Mirror, the audio chat will be initialized.

If you're looking for a lighter network, maybe if you're not using Mirror and just want WLAN audio chat, try UniVoice-Telepathy-Network based on Telepathy by vis2k

Notes

  • This network implementation has only been tested with 1 server + 2 clients. A deployment on EdgeGap (cloud) worked just fine. It's not been used in production so far, although two parties have shown interest in doing so. Due to this upcoming improvements are expected and I'll try to keep them non breaking.
  • You would want to use some sort of UDP transport in Mirror. There is usually some sort of a packet size limit, for example, Kcp (packaged with Mirror) has a limit of 1194 bytes. Adjust your UniVoiceMicInput constructor parameters accordingly.

Contact

The developer Vatsal Ambastha can be reached at the following links: website
linkedin
github
twitter
Discord server

UniVoice has been used by games, apps, as well as research projects. Commercial development and consultation can be arranged, although it's very much subject to availability and schedule.