```python:inference/core/interfaces/webrtc_worker/webrtc.py
import binascii
from typing import Any


def default_encoder(obj: Any) -> Any:
    if isinstance(obj, bytes):
        return binascii.b2a_base64(obj, newline=False).decode("ascii")
    return obj
```