diff options
author | Chocobozzz <me@florianbigard.com> | 2019-11-15 15:06:03 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-11-25 10:59:43 +0100 |
commit | d7a25329f9e607894d29ab342b9cb66638b56dc0 (patch) | |
tree | 6cd6bc4f2689f78944238b313c93427423a932ac /shared/models/videos | |
parent | 14981d7331da3f63fe6cfaf020ccb7c910006eaf (diff) | |
download | PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.tar.gz PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.tar.zst PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.zip |
Add ability to disable webtorrent
In favour of HLS
Diffstat (limited to 'shared/models/videos')
-rw-r--r-- | shared/models/videos/index.ts | 1 | ||||
-rw-r--r-- | shared/models/videos/video-file.model.ts | 12 | ||||
-rw-r--r-- | shared/models/videos/video-streaming-playlist.model.ts | 3 | ||||
-rw-r--r-- | shared/models/videos/video.model.ts | 12 |
4 files changed, 17 insertions, 11 deletions
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts index 194ae1b96..51ccb9fbd 100644 --- a/shared/models/videos/index.ts +++ b/shared/models/videos/index.ts | |||
@@ -23,6 +23,7 @@ export * from './playlist/video-playlist-element.model' | |||
23 | export * from './video-change-ownership.model' | 23 | export * from './video-change-ownership.model' |
24 | export * from './video-change-ownership-create.model' | 24 | export * from './video-change-ownership-create.model' |
25 | export * from './video-create.model' | 25 | export * from './video-create.model' |
26 | export * from './video-file.model' | ||
26 | export * from './video-privacy.enum' | 27 | export * from './video-privacy.enum' |
27 | export * from './video-rate.type' | 28 | export * from './video-rate.type' |
28 | export * from './video-resolution.enum' | 29 | export * from './video-resolution.enum' |
diff --git a/shared/models/videos/video-file.model.ts b/shared/models/videos/video-file.model.ts new file mode 100644 index 000000000..04da0627e --- /dev/null +++ b/shared/models/videos/video-file.model.ts | |||
@@ -0,0 +1,12 @@ | |||
1 | import { VideoConstant, VideoResolution } from '@shared/models' | ||
2 | |||
3 | export interface VideoFile { | ||
4 | magnetUri: string | ||
5 | resolution: VideoConstant<VideoResolution> | ||
6 | size: number // Bytes | ||
7 | torrentUrl: string | ||
8 | torrentDownloadUrl: string | ||
9 | fileUrl: string | ||
10 | fileDownloadUrl: string | ||
11 | fps: number | ||
12 | } | ||
diff --git a/shared/models/videos/video-streaming-playlist.model.ts b/shared/models/videos/video-streaming-playlist.model.ts index 17f8fe865..42fce4bdc 100644 --- a/shared/models/videos/video-streaming-playlist.model.ts +++ b/shared/models/videos/video-streaming-playlist.model.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | import { VideoStreamingPlaylistType } from './video-streaming-playlist.type' | 1 | import { VideoStreamingPlaylistType } from './video-streaming-playlist.type' |
2 | import { VideoFile } from '@shared/models/videos/video-file.model' | ||
2 | 3 | ||
3 | export class VideoStreamingPlaylist { | 4 | export class VideoStreamingPlaylist { |
4 | id: number | 5 | id: number |
@@ -9,4 +10,6 @@ export class VideoStreamingPlaylist { | |||
9 | redundancies: { | 10 | redundancies: { |
10 | baseUrl: string | 11 | baseUrl: string |
11 | }[] | 12 | }[] |
13 | |||
14 | files: VideoFile[] | ||
12 | } | 15 | } |
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts index e057b3e06..7576439fe 100644 --- a/shared/models/videos/video.model.ts +++ b/shared/models/videos/video.model.ts | |||
@@ -5,17 +5,7 @@ import { VideoPrivacy } from './video-privacy.enum' | |||
5 | import { VideoScheduleUpdate } from './video-schedule-update.model' | 5 | import { VideoScheduleUpdate } from './video-schedule-update.model' |
6 | import { VideoConstant } from './video-constant.model' | 6 | import { VideoConstant } from './video-constant.model' |
7 | import { VideoStreamingPlaylist } from './video-streaming-playlist.model' | 7 | import { VideoStreamingPlaylist } from './video-streaming-playlist.model' |
8 | 8 | import { VideoFile } from './video-file.model' | |
9 | export interface VideoFile { | ||
10 | magnetUri: string | ||
11 | resolution: VideoConstant<VideoResolution> | ||
12 | size: number // Bytes | ||
13 | torrentUrl: string | ||
14 | torrentDownloadUrl: string | ||
15 | fileUrl: string | ||
16 | fileDownloadUrl: string | ||
17 | fps: number | ||
18 | } | ||
19 | 9 | ||
20 | export interface Video { | 10 | export interface Video { |
21 | id: number | 11 | id: number |