Версия API Graph

Live Video Input Stream

Represents a live video broadcast ingest stream.

Чтение

An ingest stream for a live video

Пример

Graph API Explorer
GET /v19.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
}];
Чтобы узнать, как использовать API Graph, ознакомьтесь с нашим руководством по API Graph.

Параметры

ПараметрОписание
target_token
string

A target token recently returned by the speed test API

Поля

ПолеОписание
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

ОшибкаОписание
100Invalid parameter

Создание

Вы можете сделать запрос POST к границе input_streams из этих местоположений:
При размещении публикации на этой границе создается a LiveVideoInputStream.

Параметры

Эта конечная точка не содержит параметров.

Тип возврата

Эта конечная точка поддерживаетчтение после записи и будет считывать узел, представленный id в типе возврата.
Struct {
id: numeric string,
}

Error Codes

ОшибкаОписание
200Permissions error

Обновление

Нельзя выполнить эту операцию в этой конечной точке.

Удаление

Нельзя выполнить эту операцию в этой конечной точке.