|
@@ -153,6 +153,7 @@ class LiveingController extends AdminbaseController {
|
|
|
|
|
|
$pull_key = cmf_get_option('configpri')['tx_play_key'];
|
|
|
|
|
|
+ require CMF_ROOT . 'vendor/tencentcloud/vendor/autoload.php';
|
|
|
|
|
|
try {
|
|
|
// 为了保护密钥安全,建议将密钥设置在环境变量中或者配置文件中。
|
|
@@ -202,7 +203,7 @@ class LiveingController extends AdminbaseController {
|
|
|
$resp = $client->CreateLivePullStreamTask( $req );
|
|
|
|
|
|
// 推流地址、播流地址、taskId
|
|
|
- $data['push'] = $uid . '?' .$params['PushArgs'];
|
|
|
+ $data['push'] = 'rtmp://push.umotool.com/live/'. $uid . '?' .$params['PushArgs'];
|
|
|
$data['pull'] = 'https://umotool.com/live/'.$uid.'.flv?' .$params['PushArgs'];
|
|
|
$data['TaskId'] = $resp->TaskId;
|
|
|
|
|
@@ -265,7 +266,11 @@ class LiveingController extends AdminbaseController {
|
|
|
// return $json;
|
|
|
return json_decode( $json, 1 );
|
|
|
|
|
|
- } catch ( TencentCloudSDKException | PDOException | Exception $e ) {
|
|
|
+ } catch ( TencentCloudSDKException $e ) {
|
|
|
+ return [ 'ode' => $e->getCode(), 'msg' => $e->getMessage() ];
|
|
|
+ } catch ( PDOException $e ) {
|
|
|
+ return [ 'ode' => $e->getCode(), 'msg' => $e->getMessage() ];
|
|
|
+ }catch ( Exception $e ) {
|
|
|
return [ 'ode' => $e->getCode(), 'msg' => $e->getMessage() ];
|
|
|
}
|
|
|
}
|