twilio

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: 9 Imported by: 0

Documentation

Overview

Package twilio provides Twilio Media Streams 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 {
	TwilioSampleRate int
	SampleRate       int
	AutoHangUp       bool
}

Params configures the Twilio serializer.

type Serializer

type Serializer struct {
	StreamSid  string
	CallSid    string
	AccountSid string
	AuthToken  string
	Region     string
	Edge       string
	SampleRate int
	TwilioRate int
	AutoHangUp bool
	// contains filtered or unexported fields
}

Serializer implements serialize.Serializer and serialize.SerializerWithSetup for Twilio Media Streams.

func NewSerializer

func NewSerializer(streamSid, callSid, accountSid, authToken, region, edge string, params *Params) *Serializer

NewSerializer returns a Twilio Media Streams 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