+ updatedAt: this.updatedAt,
+ publishedAt: this.publishedAt,
+ account: {
+ id: formattedAccount.id,
+ uuid: formattedAccount.uuid,
+ name: formattedAccount.name,
+ displayName: formattedAccount.displayName,
+ url: formattedAccount.url,
+ host: formattedAccount.host,
+ avatar: formattedAccount.avatar
+ },
+ channel: {
+ id: formattedVideoChannel.id,
+ uuid: formattedVideoChannel.uuid,
+ name: formattedVideoChannel.name,
+ displayName: formattedVideoChannel.displayName,
+ url: formattedVideoChannel.url,
+ host: formattedVideoChannel.host,
+ avatar: formattedVideoChannel.avatar
+ }
+ }
+
+ if (options) {
+ if (options.additionalAttributes.state) {
+ videoObject.state = {
+ id: this.state,
+ label: VideoModel.getStateLabel(this.state)
+ }
+ }
+
+ if (options.additionalAttributes.waitTranscoding) videoObject.waitTranscoding = this.waitTranscoding
+ }
+
+ return videoObject