Documentation · v4Документация · v4
PlaySync exposes a small JSON API for the media session lifecycle plus an edge-delivered SDK. Base URL is your CDN delivery domain; this sandbox runs on PlaySync даёт небольшой JSON API для жизненного цикла медиа-сессии плюс SDK с доставкой через edge. Базовый URL — ваш CDN-домен; эта песочница работает на https://fun.thisaintu.sbs.
Load the SDK from your delivery domain and initialise it — it creates a session and keeps it in sync for you.Подключите SDK с вашего домена раздачи и инициализируйте — он создаст сессию и будет держать её в синхроне.
PlaySync is built to run behind a CDN. Two classes of traffic flow through your edge domain:PlaySync рассчитан на работу за CDN. Через ваш edge-домен идут два класса трафика:
Configure the CDN to pass query string, cookies and request headers to origin untouched, and to bypass cache for the Настройте CDN так, чтобы query, cookies и заголовки шли на origin без изменений, а кэш для префикса /api/ обходилсяprefix.
Opens a session and returns a Открывает сессию и возвращает sid + a short-lived playback короткоживущий token. A media_sid cookie is set for you.cookie выставляется автоматически.
The SDK's primary channel. Long-polls for the next state delta and is delivered edge-first for the lowest round-trip. The raw contract:Основной канал SDK. Долго-поллит следующую дельту состояния, доставка edge-first для минимального round-trip. Контракт:
| FieldПоле | InГде | DescriptionОписание |
|---|---|---|
X-Playback-Token | header | Playback token from create.Playback-токен из create. |
media_sid | cookie | Session id; pins the client to its session.Id сессии; привязывает клиента к сессии. |
offset | query | Monotonic cursor; response carries only newer events.Монотонный курсор; в ответе только новые события. |
A request without a valid established session returns Запрос без действующей сессии возвращает 404 — expected; the channel only answers live sessions.это норма; канал отвечает только живым сессиям.
One-shot read of the delta since Разовое чтение дельты с offset (non-blocking alternative to poll).(неблокирующая альтернатива poll).
Keeps an idle session alive; returns the current Держит простаивающую сессию; возвращает текущий offset + state.
Closes the session and clears the cookie.Закрывает сессию и очищает cookie.
Delivery / QoE counters: active sessions, median startup, rebuffer ratio, median poll latency.Счётчики доставки / QoE: активные сессии, медиана старта, rebuffer ratio, медиана задержки поллинга.
Reference clients ship in the repo under Референсные клиенты лежат в репозитории в examples/.
The public sandbox is for evaluation and integration tests. Production accounts are provisioned after an access request.Публичная песочница — для оценки и тестов интеграции. Продакшен-аккаунты выдаются после запроса доступа.
| CapabilityВозможность | Sandbox | Production |
|---|---|---|
| Sessions / monthСессий в месяц | 50k | UnlimitedБез лимита |
| Edge regionsРегионы edge | SingleОдин | Multi-regionМульти-регион |
| Rate limitЛимит запросов | 1,200 / min | Per planПо тарифу |
| SLA | NoneНет | 99.9–99.99% |
| QoE dashboardsQoE-дашборды | — | ✓ |
| SupportПоддержка | CommunityСообщество | Email / priorityПочта / приоритет |