Installation
Get started with Pion Interceptor by adding it to your Go project. The library requires Go 1.24.0 or later.Prerequisites
Install Go
Ensure you have Go 1.24.0 or later installed:If you need to install or upgrade Go, visit go.dev/doc/install
Install Pion Interceptor
Add the Pion Interceptor library to your project:go.mod file.
The
go get command will automatically download the library and its dependencies, including:github.com/pion/rtcp- RTCP packet typesgithub.com/pion/rtp- RTP packet typesgithub.com/pion/logging- Logging utilitiesgithub.com/pion/transport- Network transport utilities
Install Built-in Interceptors
Pion Interceptor includes several production-ready interceptors. To use them, install the specific packages you need:You only need to install the specific interceptor packages you plan to use. The base
interceptor package is always required.Verify Installation
Create a simple test file to verify your installation:main.go
Project Structure
A typical project using Pion Interceptor might look like:Update to Latest Version
To update to the latest version of Pion Interceptor:Using with Pion WebRTC
If you’re using Pion Interceptor with Pion WebRTC, install both libraries:Troubleshooting
Module not found error
Module not found error
If you see
module not found errors, ensure you’re using Go modules:Version conflicts
Version conflicts
If you encounter version conflicts, try cleaning your module cache:
Import errors
Import errors
Make sure you’re importing the correct package path:
Next Steps
Quick Start Guide
Now that you have Pion Interceptor installed, follow the quick start guide to build your first working example.