diff --git a/packages/livekit-rtc/generate_proto.sh b/packages/livekit-rtc/generate_proto.sh index e9a0cbb1..91e73ad6 100755 --- a/packages/livekit-rtc/generate_proto.sh +++ b/packages/livekit-rtc/generate_proto.sh @@ -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 \ diff --git a/packages/livekit-rtc/src/proto/track_publication_pb.ts b/packages/livekit-rtc/src/proto/track_publication_pb.ts new file mode 100644 index 00000000..e30d9d68 --- /dev/null +++ b/packages/livekit-rtc/src/proto/track_publication_pb.ts @@ -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 { + /** + * @generated from field: required uint64 track_publication_handle = 1; + */ + trackPublicationHandle?: bigint; + + /** + * @generated from field: required bool enabled = 2; + */ + enabled?: boolean; + + constructor(data?: PartialMessage) { + 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): EnableRemoteTrackPublicationRequest { + return new EnableRemoteTrackPublicationRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): EnableRemoteTrackPublicationRequest { + return new EnableRemoteTrackPublicationRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): EnableRemoteTrackPublicationRequest { + return new EnableRemoteTrackPublicationRequest().fromJsonString(jsonString, options); + } + + static equals(a: EnableRemoteTrackPublicationRequest | PlainMessage | undefined, b: EnableRemoteTrackPublicationRequest | PlainMessage | undefined): boolean { + return proto2.util.equals(EnableRemoteTrackPublicationRequest, a, b); + } +} + +/** + * @generated from message livekit.proto.EnableRemoteTrackPublicationResponse + */ +export class EnableRemoteTrackPublicationResponse extends Message { + constructor(data?: PartialMessage) { + 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): EnableRemoteTrackPublicationResponse { + return new EnableRemoteTrackPublicationResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): EnableRemoteTrackPublicationResponse { + return new EnableRemoteTrackPublicationResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): EnableRemoteTrackPublicationResponse { + return new EnableRemoteTrackPublicationResponse().fromJsonString(jsonString, options); + } + + static equals(a: EnableRemoteTrackPublicationResponse | PlainMessage | undefined, b: EnableRemoteTrackPublicationResponse | PlainMessage | 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 { + /** + * @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) { + 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): UpdateRemoteTrackPublicationDimensionRequest { + return new UpdateRemoteTrackPublicationDimensionRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateRemoteTrackPublicationDimensionRequest { + return new UpdateRemoteTrackPublicationDimensionRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): UpdateRemoteTrackPublicationDimensionRequest { + return new UpdateRemoteTrackPublicationDimensionRequest().fromJsonString(jsonString, options); + } + + static equals(a: UpdateRemoteTrackPublicationDimensionRequest | PlainMessage | undefined, b: UpdateRemoteTrackPublicationDimensionRequest | PlainMessage | undefined): boolean { + return proto2.util.equals(UpdateRemoteTrackPublicationDimensionRequest, a, b); + } +} + +/** + * @generated from message livekit.proto.UpdateRemoteTrackPublicationDimensionResponse + */ +export class UpdateRemoteTrackPublicationDimensionResponse extends Message { + constructor(data?: PartialMessage) { + 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): UpdateRemoteTrackPublicationDimensionResponse { + return new UpdateRemoteTrackPublicationDimensionResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateRemoteTrackPublicationDimensionResponse { + return new UpdateRemoteTrackPublicationDimensionResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): UpdateRemoteTrackPublicationDimensionResponse { + return new UpdateRemoteTrackPublicationDimensionResponse().fromJsonString(jsonString, options); + } + + static equals(a: UpdateRemoteTrackPublicationDimensionResponse | PlainMessage | undefined, b: UpdateRemoteTrackPublicationDimensionResponse | PlainMessage | undefined): boolean { + return proto2.util.equals(UpdateRemoteTrackPublicationDimensionResponse, a, b); + } +} +