plivo

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package plivo provides Plivo Audio Streaming WebSocket protocol serializer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Params

type Params struct {
	PlivoSampleRate int
	SampleRate      int
	AutoHangUp      bool
}

Params configures the Plivo serializer.

type Serializer

type Serializer struct {
	StreamID   string
	CallID     string
	AuthID     string
	AuthToken  string
	SampleRate int
	PlivoRate  int
	AutoHangUp bool
	// contains filtered or unexported fields
}

Serializer implements serialize.Serializer and serialize.SerializerWithSetup for Plivo.

func NewSerializer

func NewSerializer(streamID, callID, authID, authToken string, params *Params) *Serializer

NewSerializer returns a Plivo WebSocket serializer.

func (*Serializer) Deserialize

func (s *Serializer) Deserialize(data []byte) (frames.Frame, error)

Deserialize implements serialize.Serializer.

func (*Serializer) Serialize

func (s *Serializer) Serialize(f frames.Frame) ([]byte, error)

Serialize implements serialize.Serializer.

func (*Serializer) Setup

func (s *Serializer) Setup(start *frames.StartFrame)

Setup implements serialize.SerializerWithSetup.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL