Files
ZLMediaKit/webrtc/WebRtcSignalingMsg.cpp
baigao-X 3fb43c5fef feat: 增加webrtc代理拉流 (#4389)
- 增加客户端模式,支持主动拉流、推流:
   - addStreamProxy接口新增支持whep主动拉流,拉流地址目前只兼容zlm的whep url。
   - addStreamPusherProxy接口新增支持whip主动推流,推流地址目前只兼容zlm的whip url。
   - 以上推流url格式为webrtc[s]://server_host:server_port/app/stream_id?key=value, 内部会自动转换为http[s]://server_host:server_port/index/api/[whip/whep]?app=app&stream=stream_id&key=value。

- 增加WebRtc p2p 模式:
  - 增加 ICE FULL模式。
  - 增加STUN/TURN 服务器。
  - 增加websocket 信令。
  - 增加P2P代理拉流。

---------

Co-authored-by: xia-chu <771730766@qq.com>
Co-authored-by: mtdxc <mtdxc@126.com>
Co-authored-by: cqm <cqm@97kid.com>
2025-09-20 16:23:30 +08:00

50 lines
2.3 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* Copyright (c) 2016-present The ZLMediaKit project authors. All Rights Reserved.
*
* This file is part of ZLMediaKit(https://github.com/ZLMediaKit/ZLMediaKit).
*
* Use of this source code is governed by MIT-like license that can be found in the
* LICENSE file in the root of the source tree. All contributing project authors
* may be found in the AUTHORS file in the root of the source tree.
*/
#include "WebRtcSignalingMsg.h"
namespace mediakit {
namespace Rtc {
// WebRTC 信令消息键名和值常量定义
const char* const CLASS_KEY = "class";
const char* const CLASS_VALUE_REQUEST = "request";
const char* const CLASS_VALUE_INDICATION = "indication"; // 指示类型,不需要应答
const char* const CLASS_VALUE_ACCEPT = "accept"; // 作为CLASS_VALUE_REQUEST的应答
const char* const CLASS_VALUE_REJECT = "reject"; // 作为CLASS_VALUE_REQUEST的应答
const char* const METHOD_KEY = "method";
const char* const METHOD_VALUE_REGISTER = "register"; // 注册
const char* const METHOD_VALUE_UNREGISTER = "unregister"; // 注销
const char* const METHOD_VALUE_CALL = "call"; // 呼叫(取流或推流)
const char* const METHOD_VALUE_BYE = "bye"; // 挂断
const char* const METHOD_VALUE_CANDIDATE = "candidate";
const char* const TRANSACTION_ID_KEY = "transaction_id"; // 消息id,每条消息拥有一个唯一的id
const char* const ROOM_ID_KEY = "room_id";
const char* const GUEST_ID_KEY = "guest_id"; // 每个独立的会话会拥有一个唯一的guest_id
const char* const SENDER_KEY = "sender";
const char* const TYPE_KEY = "type";
const char* const TYPE_VALUE_PLAY = "play"; // 拉流
const char* const TYPE_VALUE_PUSH = "push"; // 推流
const char* const REASON_KEY = "reason";
const char* const CALL_VHOST_KEY = "vhost";
const char* const CALL_APP_KEY = "app";
const char* const CALL_STREAM_KEY = "stream";
const char* const SDP_KEY = "sdp";
const char* const ICE_SERVERS_KEY = "ice_servers";
const char* const CANDIDATE_KEY = "candidate";
const char* const URL_KEY = "url";
const char* const UFRAG_KEY = "ufrag";
const char* const PWD_KEY = "pwd";
} // namespace Rtc
} // namespace mediakit