Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support new rtmp endpoints in video client #1379

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions packages/client/src/Call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
GoLiveRequest,
GoLiveResponse,
ListRecordingsResponse,
ListRTMPBroadcastsResponse,
ListTranscriptionsResponse,
MuteUsersRequest,
MuteUsersResponse,
Expand All @@ -56,12 +57,16 @@
StartHLSBroadcastingResponse,
StartRecordingRequest,
StartRecordingResponse,
StartRTMPBroadcastsRequest,
StartRTMPBroadcastsResponse,
StartTranscriptionRequest,
StartTranscriptionResponse,
StatsOptions,
StopHLSBroadcastingResponse,
StopLiveResponse,
StopRecordingResponse,
StopRTMPBroadcastsRequest,
StopRTMPBroadcastsResponse,
StopTranscriptionResponse,
UnblockUserRequest,
UnblockUserResponse,
Expand Down Expand Up @@ -634,6 +639,27 @@
return response;
};

startRTMPBroadcast = async (data: StartRTMPBroadcastsRequest) => {
console.log('Niv is VERY VERY 1232 awesome >>>>')

Check failure on line 643 in packages/client/src/Call.ts

View workflow job for this annotation

GitHub Actions / test-and-build

Insert `;`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but probably the console.log was probably left here by mistake 🙂

return this.streamClient.post<StartRTMPBroadcastsResponse>(
`${this.streamClientBasePath}/start_rtmp_broadcasts`,
data,
);
};

stopRTMPBroadcast = async (data: StopRTMPBroadcastsRequest) => {
return this.streamClient.post<StopRTMPBroadcastsResponse>(
`${this.streamClientBasePath}/stop_rtmp_broadcasts`,
data,
);
};

listRTMPBroadcasts = async () => {
return this.streamClient.get<ListRTMPBroadcastsResponse>(
`${this.streamClientBasePath}/list_rtmp_broadcasts`,
);
};

/**
* Creates a call
*
Expand Down
182 changes: 181 additions & 1 deletion packages/client/src/gen/coordinator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3437,6 +3437,12 @@ export interface GoLiveRequest {
* @memberof GoLiveRequest
*/
start_recording?: boolean;
/**
*
* @type {boolean}
* @memberof GoLiveRequest
*/
start_rtmp_broadcasts?: boolean;
/**
*
* @type {boolean}
Expand Down Expand Up @@ -3723,6 +3729,25 @@ export interface ListDevicesResponse {
*/
duration: string;
}
/**
*
* @export
* @interface ListRTMPBroadcastsResponse
*/
export interface ListRTMPBroadcastsResponse {
/**
*
* @type {Array<RTMPBroadcast>}
* @memberof ListRTMPBroadcastsResponse
*/
broadcasts: Array<RTMPBroadcast>;
/**
* Duration of the request in human-readable format
* @type {string}
* @memberof ListRTMPBroadcastsResponse
*/
duration: string;
}
/**
*
* @export
Expand Down Expand Up @@ -4285,7 +4310,7 @@ export interface OwnUserResponse {
* @type {boolean}
* @memberof OwnUserResponse
*/
invisible?: boolean;
invisible: boolean;
/**
*
* @type {string}
Expand Down Expand Up @@ -4751,6 +4776,85 @@ export interface QueryCallsResponse {
*/
prev?: string;
}
/**
*
* @export
* @interface RTMPBroadcast
*/
export interface RTMPBroadcast {
/**
*
* @type {string}
* @memberof RTMPBroadcast
*/
created_at: string;
/**
*
* @type {string}
* @memberof RTMPBroadcast
*/
deleted_at?: string;
/**
*
* @type {string}
* @memberof RTMPBroadcast
*/
ended_at?: string;
/**
*
* @type {string}
* @memberof RTMPBroadcast
*/
error?: string;
/**
*
* @type {string}
* @memberof RTMPBroadcast
*/
error_message?: string;
/**
*
* @type {string}
* @memberof RTMPBroadcast
*/
name: string;
/**
*
* @type {string}
* @memberof RTMPBroadcast
*/
password?: string;
/**
*
* @type {string}
* @memberof RTMPBroadcast
*/
started_at?: string;
/**
*
* @type {string}
* @memberof RTMPBroadcast
*/
status: string;
/**
*
* @type {string}
* @memberof RTMPBroadcast
*/
stream_key: string;
/**
*
* @type {string}
* @memberof RTMPBroadcast
*/
stream_url: string;
/**
*
* @type {string}
* @memberof RTMPBroadcast
*/
username?: string;
}
/**
* RTMP input settings
* @export
Expand Down Expand Up @@ -5187,6 +5291,56 @@ export interface StartHLSBroadcastingResponse {
*/
playlist_url: string;
}
/**
*
* @export
* @interface StartRTMPBroadcastsRequest
*/
export interface StartRTMPBroadcastsRequest {
/**
*
* @type {string}
* @memberof StartRTMPBroadcastsRequest
*/
name?: string;
/**
*
* @type {string}
* @memberof StartRTMPBroadcastsRequest
*/
password?: string;
/**
*
* @type {string}
* @memberof StartRTMPBroadcastsRequest
*/
stream_key?: string;
/**
*
* @type {string}
* @memberof StartRTMPBroadcastsRequest
*/
stream_url?: string;
/**
*
* @type {string}
* @memberof StartRTMPBroadcastsRequest
*/
username?: string;
}
/**
*
* @export
* @interface StartRTMPBroadcastsResponse
*/
export interface StartRTMPBroadcastsResponse {
/**
* Duration of the request in human-readable format
* @type {string}
* @memberof StartRTMPBroadcastsResponse
*/
duration: string;
}
/**
*
* @export
Expand Down Expand Up @@ -5303,6 +5457,32 @@ export interface StopLiveResponse {
*/
duration: string;
}
/**
*
* @export
* @interface StopRTMPBroadcastsRequest
*/
export interface StopRTMPBroadcastsRequest {
/**
*
* @type {string}
* @memberof StopRTMPBroadcastsRequest
*/
name?: string;
}
/**
*
* @export
* @interface StopRTMPBroadcastsResponse
*/
export interface StopRTMPBroadcastsResponse {
/**
* Duration of the request in human-readable format
* @type {string}
* @memberof StopRTMPBroadcastsResponse
*/
duration: string;
}
/**
*
* @export
Expand Down
Loading