diff --git a/plugins/rtmp-services/data/schema/service-schema-v5.json b/plugins/rtmp-services/data/schema/service-schema-v5.json index 93237e089b47a9..e6c4c0d45b7908 100644 --- a/plugins/rtmp-services/data/schema/service-schema-v5.json +++ b/plugins/rtmp-services/data/schema/service-schema-v5.json @@ -233,7 +233,7 @@ }, { "$comment": "Require recommended output field if protocol field is not RTMP(S)", - "if": { "required": ["protocol"], "properties": { "protocol": { "pattern": "^(HLS|SRT|RIST|WHIP)$" } } }, + "if": { "required": ["protocol"], "properties": { "protocol": { "pattern": "^(HLS|SRT|RIST)$" } } }, "then": { "properties": { "recommended": { "required": ["output"] } } } } ] diff --git a/plugins/rtmp-services/rtmp-common.c b/plugins/rtmp-services/rtmp-common.c index 980103da12ca09..952f0c06967d88 100644 --- a/plugins/rtmp-services/rtmp-common.c +++ b/plugins/rtmp-services/rtmp-common.c @@ -1137,8 +1137,14 @@ static const char *rtmp_common_get_connect_info(void *data, uint32_t type) break; } - case OBS_SERVICE_CONNECT_INFO_BEARER_TOKEN: - return NULL; + case OBS_SERVICE_CONNECT_INFO_BEARER_TOKEN: { + const char *protocol = rtmp_common_get_protocol(data); + + if ((strcmp(protocol, "WHIP") == 0)) + return rtmp_common_key(data); + + break; + } } return NULL;