mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Add concept of video state, and add ability to wait transcoding before
publishing a video
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
ActivityUrlObject
|
||||
} from './common-objects'
|
||||
import { ActivityPubOrderedCollection } from '../activitypub-ordered-collection'
|
||||
import { VideoState } from '../../videos'
|
||||
|
||||
export interface VideoTorrentObject {
|
||||
type: 'Video'
|
||||
@@ -19,6 +20,8 @@ export interface VideoTorrentObject {
|
||||
views: number
|
||||
sensitive: boolean
|
||||
commentsEnabled: boolean
|
||||
waitTranscoding: boolean
|
||||
state: VideoState
|
||||
published: string
|
||||
updated: string
|
||||
mediaType: 'text/markdown'
|
||||
|
||||
@@ -13,3 +13,4 @@ export * from './video-rate.type'
|
||||
export * from './video-resolution.enum'
|
||||
export * from './video-update.model'
|
||||
export * from './video.model'
|
||||
export * from './video-state.enum'
|
||||
|
||||
@@ -7,7 +7,8 @@ export interface VideoCreate {
|
||||
description?: string
|
||||
support?: string
|
||||
channelId: number
|
||||
nsfw: boolean
|
||||
nsfw?: boolean
|
||||
waitTranscoding?: boolean
|
||||
name: string
|
||||
tags?: string[]
|
||||
commentsEnabled?: boolean
|
||||
|
||||
4
shared/models/videos/video-state.enum.ts
Normal file
4
shared/models/videos/video-state.enum.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export enum VideoState {
|
||||
PUBLISHED = 1,
|
||||
TO_TRANSCODE = 2
|
||||
}
|
||||
@@ -11,6 +11,7 @@ export interface VideoUpdate {
|
||||
tags?: string[]
|
||||
commentsEnabled?: boolean
|
||||
nsfw?: boolean
|
||||
waitTranscoding?: boolean
|
||||
channelId?: number
|
||||
thumbnailfile?: Blob
|
||||
previewfile?: Blob
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { VideoResolution } from '../../index'
|
||||
import { VideoResolution, VideoState } from '../../index'
|
||||
import { Account } from '../actors'
|
||||
import { Avatar } from '../avatars/avatar.model'
|
||||
import { VideoChannel } from './video-channel.model'
|
||||
@@ -41,6 +41,9 @@ export interface Video {
|
||||
dislikes: number
|
||||
nsfw: boolean
|
||||
|
||||
waitTranscoding?: boolean
|
||||
state?: VideoConstant<VideoState>
|
||||
|
||||
account: {
|
||||
id: number
|
||||
uuid: string
|
||||
@@ -70,4 +73,8 @@ export interface VideoDetails extends Video {
|
||||
files: VideoFile[]
|
||||
account: Account
|
||||
commentsEnabled: boolean
|
||||
|
||||
// Not optional in details (unlike in Video)
|
||||
waitTranscoding: boolean
|
||||
state: VideoConstant<VideoState>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user