From 7ae2f7999e76e57bb5bc553a04c331d45fea2687 Mon Sep 17 00:00:00 2001 From: devlikepro Date: Tue, 26 May 2026 10:50:18 +0700 Subject: [PATCH] [core] GOWS - send video - fix gif to mp4 format fix #2077 --- src/core/engines/gows/grpc/gows.ts | 46 ++++++++++++++++++++ src/core/engines/gows/grpc/gows_pb.js | 62 ++++++++++++++++++++++++++- 2 files changed, 107 insertions(+), 1 deletion(-) diff --git a/src/core/engines/gows/grpc/gows.ts b/src/core/engines/gows/grpc/gows.ts index 89bec309..d47313cb 100644 --- a/src/core/engines/gows/grpc/gows.ts +++ b/src/core/engines/gows/grpc/gows.ts @@ -3000,6 +3000,8 @@ export namespace messages { #one_of_decls: number[][] = []; constructor(data?: any[] | { duration?: number; + gifPlayback?: boolean; + externalShareFullVideoDurationInSeconds?: number; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); @@ -3007,6 +3009,12 @@ export namespace messages { if ("duration" in data && data.duration != undefined) { this.duration = data.duration; } + if ("gifPlayback" in data && data.gifPlayback != undefined) { + this.gifPlayback = data.gifPlayback; + } + if ("externalShareFullVideoDurationInSeconds" in data && data.externalShareFullVideoDurationInSeconds != undefined) { + this.externalShareFullVideoDurationInSeconds = data.externalShareFullVideoDurationInSeconds; + } } } get duration() { @@ -3015,22 +3023,50 @@ export namespace messages { set duration(value: number) { pb_1.Message.setField(this, 1, value); } + get gifPlayback() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set gifPlayback(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get externalShareFullVideoDurationInSeconds() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set externalShareFullVideoDurationInSeconds(value: number) { + pb_1.Message.setField(this, 3, value); + } static fromObject(data: { duration?: number; + gifPlayback?: boolean; + externalShareFullVideoDurationInSeconds?: number; }): VideoInfo { const message = new VideoInfo({}); if (data.duration != null) { message.duration = data.duration; } + if (data.gifPlayback != null) { + message.gifPlayback = data.gifPlayback; + } + if (data.externalShareFullVideoDurationInSeconds != null) { + message.externalShareFullVideoDurationInSeconds = data.externalShareFullVideoDurationInSeconds; + } return message; } toObject() { const data: { duration?: number; + gifPlayback?: boolean; + externalShareFullVideoDurationInSeconds?: number; } = {}; if (this.duration != null) { data.duration = this.duration; } + if (this.gifPlayback != null) { + data.gifPlayback = this.gifPlayback; + } + if (this.externalShareFullVideoDurationInSeconds != null) { + data.externalShareFullVideoDurationInSeconds = this.externalShareFullVideoDurationInSeconds; + } return data; } serialize(): Uint8Array; @@ -3039,6 +3075,10 @@ export namespace messages { const writer = w || new pb_1.BinaryWriter(); if (this.duration != 0) writer.writeFloat(1, this.duration); + if (this.gifPlayback != false) + writer.writeBool(2, this.gifPlayback); + if (this.externalShareFullVideoDurationInSeconds != 0) + writer.writeUint32(3, this.externalShareFullVideoDurationInSeconds); if (!w) return writer.getResultBuffer(); } @@ -3051,6 +3091,12 @@ export namespace messages { case 1: message.duration = reader.readFloat(); break; + case 2: + message.gifPlayback = reader.readBool(); + break; + case 3: + message.externalShareFullVideoDurationInSeconds = reader.readUint32(); + break; default: reader.skipField(); } } diff --git a/src/core/engines/gows/grpc/gows_pb.js b/src/core/engines/gows/grpc/gows_pb.js index 462a7c3a..b974b1fa 100644 --- a/src/core/engines/gows/grpc/gows_pb.js +++ b/src/core/engines/gows/grpc/gows_pb.js @@ -7749,7 +7749,9 @@ proto.messages.VideoInfo.prototype.toObject = function(opt_includeInstance) { */ proto.messages.VideoInfo.toObject = function(includeInstance, msg) { var f, obj = { - duration: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0) + duration: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + gifplayback: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + externalsharefullvideodurationinseconds: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -7790,6 +7792,14 @@ proto.messages.VideoInfo.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {number} */ (reader.readFloat()); msg.setDuration(value); break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setGifplayback(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setExternalsharefullvideodurationinseconds(value); + break; default: reader.skipField(); break; @@ -7826,6 +7836,20 @@ proto.messages.VideoInfo.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getGifplayback(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getExternalsharefullvideodurationinseconds(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } }; @@ -7847,6 +7871,42 @@ proto.messages.VideoInfo.prototype.setDuration = function(value) { }; +/** + * optional bool gifPlayback = 2; + * @return {boolean} + */ +proto.messages.VideoInfo.prototype.getGifplayback = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.messages.VideoInfo} returns this + */ +proto.messages.VideoInfo.prototype.setGifplayback = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional uint32 externalShareFullVideoDurationInSeconds = 3; + * @return {number} + */ +proto.messages.VideoInfo.prototype.getExternalsharefullvideodurationinseconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.messages.VideoInfo} returns this + */ +proto.messages.VideoInfo.prototype.setExternalsharefullvideodurationinseconds = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + +