javascript - 在应用 getStream 函数时出现类似“OpenTok API 请求失败:找不到流”的错误
问题描述
我们已经生成了流 id,但是当我们将流 id 传递给 getstream 函数时,我们得到了域异常错误。
我附上了以下代码...
公共函数索引1(){
$opentok = new OpenTok($this->config->item('opentok_key'), $this->config->item('opentok_secret'));
$sessionId = "1_MX40NOTI2NH5-MTYzMjQ4MDI5MDY1Nn5tNTg0aHpSRjdoTTdDb1pHUDNKYUZuSGR-fg";
$streamId = "cf91b5ac-f995-4f77-9c5a-23cf14325720";
// print_r($streamId); exit();
$stream = $opentok->getStream($sessionId, $streamId);
// print_r($stream); exit();
// // Stream properties
// $stream->id; // string with the stream ID
// $stream->videoType; // string with the video type
// $stream->name; // string with the name
// $stream->layoutClassList; // array with the layout class list
$this->load->view('index1');
}