Phiên bản API Đồ thị

Live Video Input Stream

Represents a live video broadcast ingest stream.

Đọc

An ingest stream for a live video

Ví dụ

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
}];
Nếu bạn muốn tìm hiểu cách sử dụng API Đồ thị, hãy đọc Hướng dẫn sử dụng API Đồ thị của chúng tôi.

Thông số

Thông sốMô tả
target_token
string

A target token recently returned by the speed test API

Trường

Trường thông tinMô tả
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

Mã lỗi

LỗiMô tả
100Invalid parameter

Tạo

Bạn có thể tạo yêu cầu POST đến cạnh input_streams từ các đường dẫn sau:
Khi đăng lên cạnh này, hệ thống sẽ tạo a LiveVideoInputStream.

Thông số

Điểm cuối này không có bất kỳ thông số nào.

Kiểu trả về

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

Mã lỗi

LỗiMô tả
200Permissions error

Cập nhật

Bạn không thể thực hiện thao tác này trên điểm cuối này.

Xóa

Bạn không thể thực hiện thao tác này trên điểm cuối này.