[core] GOWS - send video - fix gif to mp4 format fix #2077
This commit is contained in:
1 parent
68dc4ad642
commit
7ae2f7999e
2 files changed
+107
-1
No files matched your search
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user