Per le app
Live streaming per la tua app
Un’API e un SDK di live streaming per Next.js, Laravel, Django e qualsiasi altro stack. Un host va in diretta dal browser, da un telefono o da OBS, i nostri media server portano l’immagine a tutti quelli che guardano, e il player con la sua chat è pronto da usare, così non hai nessun media server da gestire.
I prezzi migliori per WebSocket, chiamate 1 a 1 illimitate con server TURN in tutto il mondo, e chiamate di gruppo e live streaming con una quota inclusa. Da $11.99 al mese per 1000 connessioni simultanee, con fatturazione annuale, o $14.99 con fatturazione mensile.
Spettatori oltre il tuo piano: $0.20 ogni 1.000 minuti.
Next.js sul server e React nella pagina.
export async function GET( request: Request ) {
const me = await currentUserId(); // null for a visitor
const id = new URL( request.url ).searchParams.get( 'id' )!;
// Your own check: its host goes live, the rest watch.
const token = await realtime.streamToken( me, 'live:' + id, {
role: me && await isHostOf( id, me ) ? 'host' : 'viewer',
} );
return Response.json( { token } );
}app.get( '/api/stream-token', async ( req, res ) => {
const me = userOf( req ); // null for a visitor
const { id } = req.query;
// Your own check: its host goes live, the rest watch.
const token = await realtime.streamToken( me, 'live:' + id, {
role: me && await isHostOf( id, me ) ? 'host' : 'viewer',
} );
res.json( { token } );
} );import { createServer } from 'node:http';
createServer( async ( req, res ) => {
const url = new URL( req.url, 'http://localhost' );
if ( url.pathname === '/api/stream-token' ) {
const me = userOf( req ); // null for a visitor
const id = url.searchParams.get( 'id' );
// Your own check: its host goes live, the rest watch.
const token = await realtime.streamToken( me, 'live:' + id, {
role: me && await isHostOf( id, me ) ? 'host' : 'viewer',
} );
res.writeHead( 200, { 'Content-Type': 'application/json' } );
return res.end( JSON.stringify( { token } ) );
}
// Your pages, and realtime.node( userOf ) for the SDK's routes.
} ).listen( 3000 );use Illuminate\Http\Request;
use WordPlus\Realtime\Laravel\Facades\Realtime;
Route::get( '/api/stream-token', function ( Request $request ) {
$me = $request->user()?->id; // null for a visitor
$id = $request->query( 'id' );
// Your own check: its host goes live, the rest watch.
return [ 'token' => Realtime::streamToken( $me, 'live:' . $id, [
'role' => $me && is_host_of( $id, $me ) ? 'host' : 'viewer',
] ) ];
} );require __DIR__ . '/../src/realtime.php';
$me = current_user_id(); // null for a visitor
$id = $_GET['id'] ?? '';
header( 'Content-Type: application/json' );
// Your own check: its host goes live, the rest watch.
echo json_encode( [
'token' => $realtime->streamToken( $me, 'live:' . $id, [
'role' => $me && is_host_of( $id, $me ) ? 'host' : 'viewer',
] ),
] );from django.http import JsonResponse
from .realtime import realtime
# In urls.py: path("api/stream-token", views.stream_token)
def stream_token(request):
me = request.user.id if request.user.is_authenticated else None
id = request.GET["id"]
# Your own check: its host goes live, the rest watch.
token = realtime.stream_token(
me,
"live:" + id,
role="host" if me and is_host_of(id, me) else "viewer",
)
return JsonResponse({"token": token})from fastapi import Depends
from realtime import realtime
# current_user_id answers None for a visitor.
@app.get("/api/stream-token")
def stream_token(id: str, me: int | None = Depends(current_user_id)):
# Your own check: its host goes live, the rest watch.
token = realtime.stream_token(
me,
"live:" + id,
role="host" if me and is_host_of(id, me) else "viewer",
)
return {"token": token}from flask import request, session
from realtime import realtime
@app.get("/api/stream-token")
def stream_token():
me = session.get("user_id") # None for a visitor
id = request.args["id"]
# Your own check: its host goes live, the rest watch.
token = realtime.stream_token(
me,
"live:" + id,
role="host" if me and is_host_of(id, me) else "viewer",
)
return {"token": token}// http.HandleFunc("GET /api/stream-token", streamToken)
func streamToken(w http.ResponseWriter, r *http.Request) {
me := userOf(r) // empty for a visitor
id := r.URL.Query().Get("id")
// Your own check: its host goes live, the rest watch.
role := "viewer"
if me != "" && isHostOf(id, me) {
role = "host"
}
token := app.StreamToken(wordplus.Stream{
Name: "live:" + id,
Role: role,
User: me,
})
reply(w, map[string]string{"token": token})
}Hook e componenti per qualsiasi app React, con uno qualsiasi dei server sopra.
import { connect } from '@wordplus/realtime';
const rt = await connect();
// The player and the studio.
await rt.streamScreen();
// And in the page:
// <live-stream name="live:12"
// token-url="/api/stream-token?id=12"
// title="Opening night"></live-stream>import { connect } from '@wordplus/realtime';
const rt = await connect();
// The player and the studio.
await rt.streamScreen();
// And in the page:
// <live-stream name="live:12"
// token-url="/api/stream-token?id=12"
// title="Opening night"></live-stream>import { connect } from '@wordplus/realtime';
const rt = await connect();
// The player and the studio.
await rt.streamScreen();
// And in the page:
// <live-stream name="live:12"
// token-url="/api/stream-token?id=12"
// title="Opening night"></live-stream>import { connect } from '@wordplus/realtime';
const rt = await connect( window.wordplusRealtimeConfig );
// The player and the studio.
await rt.streamScreen();
// And in the page:
// <live-stream name="live:12"
// token-url="/api/stream-token?id=12"
// title="Opening night"></live-stream><live-stream name="live:12"
token-url="/api/stream-token?id=12"
title="Opening night"></live-stream>
<script type="module">
import { connect } from '@wordplus/realtime';
const rt = await connect( window.wordplusRealtimeConfig );
// The player and the studio.
await rt.streamScreen();
</script><live-stream name="live:12"
token-url="/api/stream-token?id=12"
title="Opening night"></live-stream>
<script type="module">
import { connect } from '@wordplus/realtime';
const rt = await connect( window.wordplusRealtimeConfig );
// The player and the studio.
await rt.streamScreen();
</script><live-stream name="live:12"
token-url="/api/stream-token?id=12"
title="Opening night"></live-stream>
<script type="module">
import { connect } from '@wordplus/realtime';
const rt = await connect( window.wordplusRealtimeConfig );
// The player and the studio.
await rt.streamScreen();
</script><live-stream name="live:12"
token-url="/api/stream-token?id=12"
title="Opening night"></live-stream>
<script type="module">
import { connect } from '@wordplus/realtime';
const rt = await connect( window.wordplusRealtimeConfig );
// The player and the studio.
await rt.streamScreen();
</script>import { connect } from '@wordplus/realtime';
const settings = await fetch( '/api/realtime/config' );
const rt = await connect( await settings.json() );
// The player and the studio.
await rt.streamScreen();
// And in the page:
// <live-stream name="live:12"
// token-url="/api/stream-token?id=12"
// title="Opening night"></live-stream><live-stream name="live:{{ $event->id }}"
token-url="/api/stream-token?id={{ $event->id }}"
title="{{ $event->title }}"></live-stream>
<script type="module">
// The player and the studio.
await window.Echo.connector.rt.streamScreen();
</script>'use client'; // in Next.js
import { LiveStream } from '@wordplus/realtime/react';
// Inside <RealtimeProvider>, once for the whole app.
export function Stream( { id, title } ) {
return (
<LiveStream name={ `live:${ id }` } title={ title }
tokenUrl={ `/api/stream-token?id=${ id }` } />
);
}<script setup>
import { onMounted } from 'vue';
// realtime.js, one connection for the whole app:
// export const realtime = connect();
import { realtime } from './realtime';
defineProps( [ 'id', 'title' ] );
onMounted( async () => {
// The player and the studio.
( await realtime ).streamScreen();
} );
</script>
<!-- isCustomElement for this tag, in vite.config.js -->
<template>
<live-stream :name="`live:${ id }`" :title="title"
:token-url="`/api/stream-token?id=${ id }`"></live-stream>
</template><script>
import { onMount } from 'svelte';
// realtime.js, one connection for the whole app:
// export const realtime = connect();
import { realtime } from './realtime';
let { id, title } = $props();
onMount( async () => {
// The player and the studio.
( await realtime ).streamScreen();
} );
</script>
<live-stream name="live:{ id }" { title }
token-url="/api/stream-token?id={ id }"></live-stream>import {
Component, CUSTOM_ELEMENTS_SCHEMA, Input,
} from '@angular/core';
// realtime.ts, one connection for the whole app:
// export const realtime = connect();
import { realtime } from './realtime';
@Component( {
selector: 'app-stream',
schemas: [ CUSTOM_ELEMENTS_SCHEMA ],
template: `
<live-stream [attr.name]="'live:' + id"
[attr.token-url]="'/api/stream-token?id=' + id"
[attr.title]="title"></live-stream>
`,
} )
export class StreamComponent {
@Input( { required: true } ) id!: number;
@Input( { required: true } ) title!: string;
async ngOnInit() {
// The player and the studio.
( await realtime ).streamScreen();
}
}import WordPlusRealtimeCalls
import WordPlusRealtimeUI
// Your own request to your route, asked again as tokens run out.
let stream = try await rt.joinStream {
try await api.streamToken(id: 12)
}
present(LiveStreamScreen(stream: stream, title: "Opening night"),
animated: true)import cloud.wordplus.realtime.calls.joinStream
import cloud.wordplus.realtime.ui.LiveStreamScreen
// Your own request to your route, asked again as tokens run out.
val stream = rt.joinStream(context) {
api.streamToken(id = 12)
}
LiveStreamScreen.open(activity, stream, title = "Opening night")import { LiveStreamButton } from '@wordplus/realtime-react-native';
// Your server, in full, as an app has no address of its own.
const API = 'https://app.example.com/api';
// Inside <RealtimeProvider>, once for the whole app.
export function Stream( { id, title } ) {
return (
<LiveStreamButton name={ `live:${ id }` } title={ title }
tokenUrl={ `${ API }/stream-token?id=${ id }` }>
Watch
</LiveStreamButton>
);
}import 'package:flutter/material.dart';
import 'package:wordplus_realtime/wordplus_realtime.dart';
// Your server, in full, as an app has no address of its own.
const api = 'https://app.example.com/api';
// In your build. It asks your route again as tokens run out.
LiveStreamButton(
rt: rt,
stream: 'live:12',
tokenUrl: '$api/stream-token?id=12',
title: 'Opening night',
child: const Text('Watch'),
)
Prova una diretta
Vai in diretta da questa pagina, poi guardala dal telefono o da una seconda finestra. Nessun account necessario.
Queste sono le schermate che l’SDK dà alla tua app. Il browser chiede fotocamera e microfono, non viene registrato nulla e la demo termina dopo 10 minuti.
Host e moderatori
Vai in diretta dal browser, da un telefono o da OBS
Lo studio e la chat arrivano con il player, per l’host e i moderatori indicati dal tuo server.
La fotocamera, uno schermo o OBS
L’host vede l’immagine prima di andare in diretta, poi va in diretta con un clic e chiude la diretta per tutti. Trasmette dalla fotocamera e dal microfono del browser o di un telefono, condivide uno schermo, o invia l’immagine da OBS o da qualsiasi altro encoder tramite WHIP.

Una chat che resta in ordine
Gli spettatori scrivono nella chat accanto all’immagine e mandano reazioni sopra di essa. L’host e i moderatori indicati dal tuo server fissano ed eliminano messaggi, rallentano la chat, silenziano qualcuno per un certo tempo, e lo rimuovono o lo bannano. Il tuo server può fare lo stesso, e scrivere nella chat con un nome tutto suo.

Spettatori
Tutti quelli che guardano, con o senza accesso
A uno spettatore basta un link alla pagina. Guarda, scrive nella chat e reagisce, e tutti vedono quanti stanno guardando.
Nessun account per guardare
Il tuo server rende spettatore un visitatore, così chiunque abbia il link guarda, e accede per scrivere nella chat. Oppure riserva una diretta ai soli membri.
Un’immagine per ogni schermo
Ogni spettatore riceve l’immagine nella dimensione che il suo schermo e la sua connessione reggono, sul web, su iOS e su Android, con il conteggio in tempo reale di chi guarda.
Ospiti sul palco
Uno spettatore alza la mano, e l’host lo fa salire sul palco con la sua fotocamera e il suo microfono, per una domanda, un’intervista o un panel.
Decide il tuo server
Poche righe nel tuo stack
Il tuo server dice chi conduce ogni diretta, chi guarda e chi modera la chat. La pagina mostra la diretta con un solo elemento, o con il tuo codice.
Next.js sul server e React nella pagina.
export async function GET( request: Request ) {
const me = await currentUserId(); // null for a visitor
const id = new URL( request.url ).searchParams.get( 'id' )!;
// Your own check: its host goes live, the rest watch.
const token = await realtime.streamToken( me, 'live:' + id, {
role: me && await isHostOf( id, me ) ? 'host' : 'viewer',
mod: me && await isModerator( me ),
settings: { reactions: true },
} );
return Response.json( { token } );
}app.get( '/api/stream-token', async ( req, res ) => {
const me = userOf( req ); // null for a visitor
const { id } = req.query;
// Your own check: its host goes live, the rest watch.
const token = await realtime.streamToken( me, 'live:' + id, {
role: me && await isHostOf( id, me ) ? 'host' : 'viewer',
mod: me && await isModerator( me ),
settings: { reactions: true },
} );
res.json( { token } );
} );import { createServer } from 'node:http';
createServer( async ( req, res ) => {
const url = new URL( req.url, 'http://localhost' );
if ( url.pathname === '/api/stream-token' ) {
const me = userOf( req ); // null for a visitor
const id = url.searchParams.get( 'id' );
// Your own check: its host goes live, the rest watch.
const token = await realtime.streamToken( me, 'live:' + id, {
role: me && await isHostOf( id, me ) ? 'host' : 'viewer',
mod: me && await isModerator( me ),
settings: { reactions: true },
} );
res.writeHead( 200, { 'Content-Type': 'application/json' } );
return res.end( JSON.stringify( { token } ) );
}
// Your pages, and realtime.node( userOf ) for the SDK's routes.
} ).listen( 3000 );use Illuminate\Http\Request;
use WordPlus\Realtime\Laravel\Facades\Realtime;
Route::get( '/api/stream-token', function ( Request $request ) {
$me = $request->user()?->id; // null for a visitor
$id = $request->query( 'id' );
// Your own check: its host goes live, the rest watch.
return [ 'token' => Realtime::streamToken( $me, 'live:' . $id, [
'role' => $me && is_host_of( $id, $me ) ? 'host' : 'viewer',
'mod' => $me && is_moderator( $me ),
'settings' => [ 'reactions' => true ],
] ) ];
} );require __DIR__ . '/../src/realtime.php';
$me = current_user_id(); // null for a visitor
$id = $_GET['id'] ?? '';
header( 'Content-Type: application/json' );
// Your own check: its host goes live, the rest watch.
echo json_encode( [
'token' => $realtime->streamToken( $me, 'live:' . $id, [
'role' => $me && is_host_of( $id, $me ) ? 'host' : 'viewer',
'mod' => $me && is_moderator( $me ),
'settings' => [ 'reactions' => true ],
] ),
] );from django.http import JsonResponse
from .realtime import realtime
# In urls.py: path("api/stream-token", views.stream_token)
def stream_token(request):
me = request.user.id if request.user.is_authenticated else None
id = request.GET["id"]
# Your own check: its host goes live, the rest watch.
token = realtime.stream_token(
me,
"live:" + id,
role="host" if me and is_host_of(id, me) else "viewer",
mod=bool(me and is_moderator(me)),
settings={"reactions": True},
)
return JsonResponse({"token": token})from fastapi import Depends
from realtime import realtime
# current_user_id answers None for a visitor.
@app.get("/api/stream-token")
def stream_token(id: str, me: int | None = Depends(current_user_id)):
# Your own check: its host goes live, the rest watch.
token = realtime.stream_token(
me,
"live:" + id,
role="host" if me and is_host_of(id, me) else "viewer",
mod=bool(me and is_moderator(me)),
settings={"reactions": True},
)
return {"token": token}from flask import request, session
from realtime import realtime
@app.get("/api/stream-token")
def stream_token():
me = session.get("user_id") # None for a visitor
id = request.args["id"]
# Your own check: its host goes live, the rest watch.
token = realtime.stream_token(
me,
"live:" + id,
role="host" if me and is_host_of(id, me) else "viewer",
mod=bool(me and is_moderator(me)),
settings={"reactions": True},
)
return {"token": token}// http.HandleFunc("GET /api/stream-token", streamToken)
func streamToken(w http.ResponseWriter, r *http.Request) {
me := userOf(r) // empty for a visitor
id := r.URL.Query().Get("id")
// Your own check: its host goes live, the rest watch.
role := "viewer"
if me != "" && isHostOf(id, me) {
role = "host"
}
token := app.StreamToken(wordplus.Stream{
Name: "live:" + id,
Role: role,
User: me,
Mod: me != "" && isModerator(me),
React: wordplus.Yes,
})
reply(w, map[string]string{"token": token})
}Hook e componenti per qualsiasi app React, con uno qualsiasi dei server sopra.
import { connect } from '@wordplus/realtime';
const rt = await connect();
// The player and the studio.
await rt.streamScreen();
// And in the page:
// <live-stream name="live:12"
// token-url="/api/stream-token?id=12"
// title="Opening night"></live-stream>import { connect } from '@wordplus/realtime';
const rt = await connect();
// The player and the studio.
await rt.streamScreen();
// And in the page:
// <live-stream name="live:12"
// token-url="/api/stream-token?id=12"
// title="Opening night"></live-stream>import { connect } from '@wordplus/realtime';
const rt = await connect();
// The player and the studio.
await rt.streamScreen();
// And in the page:
// <live-stream name="live:12"
// token-url="/api/stream-token?id=12"
// title="Opening night"></live-stream>import { connect } from '@wordplus/realtime';
const rt = await connect( window.wordplusRealtimeConfig );
// The player and the studio.
await rt.streamScreen();
// And in the page:
// <live-stream name="live:12"
// token-url="/api/stream-token?id=12"
// title="Opening night"></live-stream><live-stream name="live:12"
token-url="/api/stream-token?id=12"
title="Opening night"></live-stream>
<script type="module">
import { connect } from '@wordplus/realtime';
const rt = await connect( window.wordplusRealtimeConfig );
// The player and the studio.
await rt.streamScreen();
</script><live-stream name="live:12"
token-url="/api/stream-token?id=12"
title="Opening night"></live-stream>
<script type="module">
import { connect } from '@wordplus/realtime';
const rt = await connect( window.wordplusRealtimeConfig );
// The player and the studio.
await rt.streamScreen();
</script><live-stream name="live:12"
token-url="/api/stream-token?id=12"
title="Opening night"></live-stream>
<script type="module">
import { connect } from '@wordplus/realtime';
const rt = await connect( window.wordplusRealtimeConfig );
// The player and the studio.
await rt.streamScreen();
</script><live-stream name="live:12"
token-url="/api/stream-token?id=12"
title="Opening night"></live-stream>
<script type="module">
import { connect } from '@wordplus/realtime';
const rt = await connect( window.wordplusRealtimeConfig );
// The player and the studio.
await rt.streamScreen();
</script>import { connect } from '@wordplus/realtime';
const settings = await fetch( '/api/realtime/config' );
const rt = await connect( await settings.json() );
// The player and the studio.
await rt.streamScreen();
// And in the page:
// <live-stream name="live:12"
// token-url="/api/stream-token?id=12"
// title="Opening night"></live-stream><live-stream name="live:{{ $event->id }}"
token-url="/api/stream-token?id={{ $event->id }}"
title="{{ $event->title }}"></live-stream>
<script type="module">
// The player and the studio.
await window.Echo.connector.rt.streamScreen();
</script>'use client'; // in Next.js
import { LiveStream } from '@wordplus/realtime/react';
// Inside <RealtimeProvider>, once for the whole app.
export function Stream( { id, title } ) {
return (
<LiveStream name={ `live:${ id }` } title={ title }
tokenUrl={ `/api/stream-token?id=${ id }` } />
);
}<script setup>
import { onMounted } from 'vue';
// realtime.js, one connection for the whole app:
// export const realtime = connect();
import { realtime } from './realtime';
defineProps( [ 'id', 'title' ] );
onMounted( async () => {
// The player and the studio.
( await realtime ).streamScreen();
} );
</script>
<!-- isCustomElement for this tag, in vite.config.js -->
<template>
<live-stream :name="`live:${ id }`" :title="title"
:token-url="`/api/stream-token?id=${ id }`"></live-stream>
</template><script>
import { onMount } from 'svelte';
// realtime.js, one connection for the whole app:
// export const realtime = connect();
import { realtime } from './realtime';
let { id, title } = $props();
onMount( async () => {
// The player and the studio.
( await realtime ).streamScreen();
} );
</script>
<live-stream name="live:{ id }" { title }
token-url="/api/stream-token?id={ id }"></live-stream>import {
Component, CUSTOM_ELEMENTS_SCHEMA, Input,
} from '@angular/core';
// realtime.ts, one connection for the whole app:
// export const realtime = connect();
import { realtime } from './realtime';
@Component( {
selector: 'app-stream',
schemas: [ CUSTOM_ELEMENTS_SCHEMA ],
template: `
<live-stream [attr.name]="'live:' + id"
[attr.token-url]="'/api/stream-token?id=' + id"
[attr.title]="title"></live-stream>
`,
} )
export class StreamComponent {
@Input( { required: true } ) id!: number;
@Input( { required: true } ) title!: string;
async ngOnInit() {
// The player and the studio.
( await realtime ).streamScreen();
}
}import WordPlusRealtimeCalls
import WordPlusRealtimeUI
// Your own request to your route, asked again as tokens run out.
let stream = try await rt.joinStream {
try await api.streamToken(id: 12)
}
present(LiveStreamScreen(stream: stream, title: "Opening night"),
animated: true)import cloud.wordplus.realtime.calls.joinStream
import cloud.wordplus.realtime.ui.LiveStreamScreen
// Your own request to your route, asked again as tokens run out.
val stream = rt.joinStream(context) {
api.streamToken(id = 12)
}
LiveStreamScreen.open(activity, stream, title = "Opening night")import { LiveStreamButton } from '@wordplus/realtime-react-native';
// Your server, in full, as an app has no address of its own.
const API = 'https://app.example.com/api';
// Inside <RealtimeProvider>, once for the whole app.
export function Stream( { id, title } ) {
return (
<LiveStreamButton name={ `live:${ id }` } title={ title }
tokenUrl={ `${ API }/stream-token?id=${ id }` }>
Watch
</LiveStreamButton>
);
}import 'package:flutter/material.dart';
import 'package:wordplus_realtime/wordplus_realtime.dart';
// Your server, in full, as an app has no address of its own.
const api = 'https://app.example.com/api';
// In your build. It asks your route again as tokens run out.
LiveStreamButton(
rt: rt,
stream: 'live:12',
tokenUrl: '$api/stream-token?id=12',
title: 'Opening night',
child: const Text('Watch'),
)Le dirette in ogni stack, con tutta la configurazione:
Casi d’uso
Cosa si costruisce con le dirette
Ognuno è un’app completa nella documentazione, con il suo server in Node.js, PHP e Python.
Eventi dal vivo
Un lancio, una lezione, un talk o un concerto, in diretta per chiunque apra la pagina.
Dirette riservate ai membri
Una diretta che possono guardare solo i membri di un club, chi ha un biglietto o gli studenti di un corso.
Interviste e domande sul palco
Gli spettatori alzano la mano, e l’host li fa salire sul palco accanto a sé, nel layout che sceglie.
Prezzi
Prezzo per connessioni, mai per messaggi
Da $11.99 al mese per 1000 connessioni simultanee, con fatturazione annuale, o $14.99 con fatturazione mensile.
Spettatori oltre il tuo piano: $0.20 ogni 1.000 minuti.
Un solo prezzo a qualsiasi risoluzione. Banda, relay e messaggi non vengono mai addebitati, e le chiamate tra due persone sono incluse. Gestiamo in proprio relay e media server, ed è per questo che questi prezzi restano bassi.
Prezzo in base alle connessioni simultanee, a partire da 1.000, con fatturazione mensile o annuale.
Con 1.000 connessioni, le dirette sono senza conteggio fino a 50 spettatori contemporanei, e ogni 1.000 connessioni in più aggiungono 20 spettatori. Oltre, ogni spettatore in più consuma un credito al minuto, conteggiato solo mentre la diretta è in onda, e il tuo piano aggiunge 5000 crediti al mese ogni 1.000 connessioni.
Domande
Domande frequenti
Mi serve un media server mio?
No. L’host invia l’immagine ai nostri media server, che la portano a tutti quelli che guardano. OBS e gli altri encoder la inviano tramite WHIP. Non hai niente da ospitare.
Quali stack possono usare l’SDK di live streaming?
Next.js ed Express, Laravel e PHP puro, Django, FastAPI e Flask, Capacitor, iOS e Android, ciascuno con una guida. Un server in qualsiasi altro linguaggio usa l’API HTTP. Le app Flutter hanno le dirette su iOS e Android, e le app React Native per ora su iOS.
Si può guardare senza un account?
Sì. Il tuo server rende spettatore un visitatore che non ha effettuato l’accesso, così chiunque abbia il link guarda, e accede per scrivere nella chat. Oppure riserva una diretta ai soli membri, e un link passato di mano in mano non apre niente.
Posso trasmettere da OBS?
Sì. Lo studio dà all’host un indirizzo e una chiave per OBS o per qualsiasi altro encoder che trasmette tramite WHIP, e l’immagine dell’encoder prende il posto della fotocamera. Una nuova chiave disattiva quella vecchia.
Quante persone possono guardare?
Con 1.000 connessioni, fino a 50 spettatori contemporanei non consumano crediti, e ogni 1.000 connessioni in più ne aggiungono 20. Oltre, ogni spettatore in più consuma un credito al minuto, conteggiato solo mentre la diretta è in onda.
Chi modera la chat?
L’host, e chiunque il tuo server renda moderatore. Fissano ed eliminano messaggi, rallentano la chat, silenziano qualcuno da un minuto fino a un giorno, e rimuovono qualcuno dalla diretta o lo bannano. Anche il tuo server può fare tutto questo, senza nessuna pagina aperta.
Posso costruire il mio player?
Sì. Il player, la chat e lo studio sono facoltativi. Metti ogni parte dove la vuole la tua pagina, oppure disegna tu stesso la diretta con l’SDK: l’immagine, gli spettatori, la chat e le reazioni.
Posso addebitare la visione?
Sì. Il tuo server decide chi può guardare, così un biglietto o un’iscrizione apre la diretta. WordPlus Cloud comunica al tuo server via webhook quando ogni spettatore che ha effettuato l’accesso inizia e smette di guardare, conteggiato sui suoi server, così la tua app può fatturare per visione o al minuto.
Domande sulla tua integrazione? Scrivici: ti aiutiamo con gli SDK, il player e il tuo stack.