Versão Graph API

Live Video Input Stream

Represents a live video broadcast ingest stream.

Leitura

An ingest stream for a live video

Exemplo

Graph API Explorer
GET /v21.0/{live-video-input-stream-id} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{live-video-input-stream-id}',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{live-video-input-stream-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{live-video-input-stream-id}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{live-video-input-stream-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
Se quiser saber como usar a Graph API, leia nosso guia sobre Como usar a Graph API.

Parâmetros

ParâmetroDescrição
target_token
string

A target token recently returned by the speed test API

Campos

CampoDescrição
id
numeric string

The ID of the input stream

dash_ingest_url
string

The dash ingest stream URL of this stream

dash_preview_url
string

Preview URL for input to use with dash player

is_master
bool

Set to true if this is input is being served to viewers

secure_stream_url
string

The RTMPS URL for this stream

stream_health
LiveVideoStreamHealth

Parameters indicating the input stream health

stream_id
numeric string

0-indexed ID for this ingest stream

stream_url
string

The ingest RTMP URL for this stream

Error Codes

ErroDescrição
100Invalid parameter

Criando

You can make a POST request to input_streams edge from the following paths:
When posting to this edge, a LiveVideoInputStream will be created.

Parâmetros

Este ponto de extremidade não tem nenhum parâmetro.

Return Type

This endpoint supports read-after-write and will read the node represented by id in the return type.
Struct {
id: numeric string,
}

Error Codes

ErroDescrição
200Permissions error

Atualizando

Não é possível executar esta operação neste ponto de extremidade.

Excluindo

Não é possível executar esta operação neste ponto de extremidade.