Skip to content

Commit

Permalink
add track publication pb
Browse files Browse the repository at this point in the history
  • Loading branch information
nbsp committed Jan 3, 2025
1 parent 769cd21 commit ad2e41c
Show file tree
Hide file tree
Showing 2 changed files with 181 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/livekit-rtc/generate_proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ PATH=$PATH:$(pwd)/node_modules/.bin \
$FFI_PROTOCOL/participant.proto \
$FFI_PROTOCOL/room.proto \
$FFI_PROTOCOL/track.proto \
$FFI_PROTOCOL/track_publication.proto \
$FFI_PROTOCOL/video_frame.proto \
$FFI_PROTOCOL/e2ee.proto \
$FFI_PROTOCOL/stats.proto \
Expand Down
180 changes: 180 additions & 0 deletions packages/livekit-rtc/src/proto/track_publication_pb.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
// Copyright 2023 LiveKit, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.js"
// @generated from file track_publication.proto (package livekit.proto, syntax proto2)
/* eslint-disable */
// @ts-nocheck

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto2 } from "@bufbuild/protobuf";

/**
* Enable/Disable a remote track publication
*
* @generated from message livekit.proto.EnableRemoteTrackPublicationRequest
*/
export class EnableRemoteTrackPublicationRequest extends Message<EnableRemoteTrackPublicationRequest> {
/**
* @generated from field: required uint64 track_publication_handle = 1;
*/
trackPublicationHandle?: bigint;

/**
* @generated from field: required bool enabled = 2;
*/
enabled?: boolean;

constructor(data?: PartialMessage<EnableRemoteTrackPublicationRequest>) {
super();
proto2.util.initPartial(data, this);
}

static readonly runtime: typeof proto2 = proto2;
static readonly typeName = "livekit.proto.EnableRemoteTrackPublicationRequest";
static readonly fields: FieldList = proto2.util.newFieldList(() => [
{ no: 1, name: "track_publication_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
{ no: 2, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnableRemoteTrackPublicationRequest {
return new EnableRemoteTrackPublicationRequest().fromBinary(bytes, options);
}

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnableRemoteTrackPublicationRequest {
return new EnableRemoteTrackPublicationRequest().fromJson(jsonValue, options);
}

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnableRemoteTrackPublicationRequest {
return new EnableRemoteTrackPublicationRequest().fromJsonString(jsonString, options);
}

static equals(a: EnableRemoteTrackPublicationRequest | PlainMessage<EnableRemoteTrackPublicationRequest> | undefined, b: EnableRemoteTrackPublicationRequest | PlainMessage<EnableRemoteTrackPublicationRequest> | undefined): boolean {
return proto2.util.equals(EnableRemoteTrackPublicationRequest, a, b);
}
}

/**
* @generated from message livekit.proto.EnableRemoteTrackPublicationResponse
*/
export class EnableRemoteTrackPublicationResponse extends Message<EnableRemoteTrackPublicationResponse> {
constructor(data?: PartialMessage<EnableRemoteTrackPublicationResponse>) {
super();
proto2.util.initPartial(data, this);
}

static readonly runtime: typeof proto2 = proto2;
static readonly typeName = "livekit.proto.EnableRemoteTrackPublicationResponse";
static readonly fields: FieldList = proto2.util.newFieldList(() => [
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnableRemoteTrackPublicationResponse {
return new EnableRemoteTrackPublicationResponse().fromBinary(bytes, options);
}

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnableRemoteTrackPublicationResponse {
return new EnableRemoteTrackPublicationResponse().fromJson(jsonValue, options);
}

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnableRemoteTrackPublicationResponse {
return new EnableRemoteTrackPublicationResponse().fromJsonString(jsonString, options);
}

static equals(a: EnableRemoteTrackPublicationResponse | PlainMessage<EnableRemoteTrackPublicationResponse> | undefined, b: EnableRemoteTrackPublicationResponse | PlainMessage<EnableRemoteTrackPublicationResponse> | undefined): boolean {
return proto2.util.equals(EnableRemoteTrackPublicationResponse, a, b);
}
}

/**
* update a remote track publication dimension
*
* @generated from message livekit.proto.UpdateRemoteTrackPublicationDimensionRequest
*/
export class UpdateRemoteTrackPublicationDimensionRequest extends Message<UpdateRemoteTrackPublicationDimensionRequest> {
/**
* @generated from field: required uint64 track_publication_handle = 1;
*/
trackPublicationHandle?: bigint;

/**
* @generated from field: required uint32 width = 2;
*/
width?: number;

/**
* @generated from field: required uint32 height = 3;
*/
height?: number;

constructor(data?: PartialMessage<UpdateRemoteTrackPublicationDimensionRequest>) {
super();
proto2.util.initPartial(data, this);
}

static readonly runtime: typeof proto2 = proto2;
static readonly typeName = "livekit.proto.UpdateRemoteTrackPublicationDimensionRequest";
static readonly fields: FieldList = proto2.util.newFieldList(() => [
{ no: 1, name: "track_publication_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
{ no: 2, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true },
{ no: 3, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateRemoteTrackPublicationDimensionRequest {
return new UpdateRemoteTrackPublicationDimensionRequest().fromBinary(bytes, options);
}

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateRemoteTrackPublicationDimensionRequest {
return new UpdateRemoteTrackPublicationDimensionRequest().fromJson(jsonValue, options);
}

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateRemoteTrackPublicationDimensionRequest {
return new UpdateRemoteTrackPublicationDimensionRequest().fromJsonString(jsonString, options);
}

static equals(a: UpdateRemoteTrackPublicationDimensionRequest | PlainMessage<UpdateRemoteTrackPublicationDimensionRequest> | undefined, b: UpdateRemoteTrackPublicationDimensionRequest | PlainMessage<UpdateRemoteTrackPublicationDimensionRequest> | undefined): boolean {
return proto2.util.equals(UpdateRemoteTrackPublicationDimensionRequest, a, b);
}
}

/**
* @generated from message livekit.proto.UpdateRemoteTrackPublicationDimensionResponse
*/
export class UpdateRemoteTrackPublicationDimensionResponse extends Message<UpdateRemoteTrackPublicationDimensionResponse> {
constructor(data?: PartialMessage<UpdateRemoteTrackPublicationDimensionResponse>) {
super();
proto2.util.initPartial(data, this);
}

static readonly runtime: typeof proto2 = proto2;
static readonly typeName = "livekit.proto.UpdateRemoteTrackPublicationDimensionResponse";
static readonly fields: FieldList = proto2.util.newFieldList(() => [
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateRemoteTrackPublicationDimensionResponse {
return new UpdateRemoteTrackPublicationDimensionResponse().fromBinary(bytes, options);
}

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateRemoteTrackPublicationDimensionResponse {
return new UpdateRemoteTrackPublicationDimensionResponse().fromJson(jsonValue, options);
}

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateRemoteTrackPublicationDimensionResponse {
return new UpdateRemoteTrackPublicationDimensionResponse().fromJsonString(jsonString, options);
}

static equals(a: UpdateRemoteTrackPublicationDimensionResponse | PlainMessage<UpdateRemoteTrackPublicationDimensionResponse> | undefined, b: UpdateRemoteTrackPublicationDimensionResponse | PlainMessage<UpdateRemoteTrackPublicationDimensionResponse> | undefined): boolean {
return proto2.util.equals(UpdateRemoteTrackPublicationDimensionResponse, a, b);
}
}

0 comments on commit ad2e41c

Please sign in to comment.