mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Basic video redundancy implementation
This commit is contained in:
parent
a651038487
commit
c48e82b5e0
77 changed files with 1667 additions and 287 deletions
|
@ -4,11 +4,18 @@ import { ActorFollowModel } from '../../models/activitypub/actor-follow'
|
|||
import { VideoModel } from '../../models/video/video'
|
||||
import { VideoAbuseModel } from '../../models/video/video-abuse'
|
||||
import { VideoCommentModel } from '../../models/video/video-comment'
|
||||
import { VideoFileModel } from '../../models/video/video-file'
|
||||
|
||||
function getVideoActivityPubUrl (video: VideoModel) {
|
||||
return CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid
|
||||
}
|
||||
|
||||
function getVideoCacheFileActivityPubUrl (videoFile: VideoFileModel) {
|
||||
const suffixFPS = videoFile.fps ? '-' + videoFile.fps : ''
|
||||
|
||||
return `${CONFIG.WEBSERVER.URL}/redundancy/videos/${videoFile.Video.uuid}/${videoFile.resolution}${suffixFPS}`
|
||||
}
|
||||
|
||||
function getVideoCommentActivityPubUrl (video: VideoModel, videoComment: VideoCommentModel) {
|
||||
return CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid + '/comments/' + videoComment.id
|
||||
}
|
||||
|
@ -101,5 +108,6 @@ export {
|
|||
getVideoSharesActivityPubUrl,
|
||||
getVideoCommentsActivityPubUrl,
|
||||
getVideoLikesActivityPubUrl,
|
||||
getVideoDislikesActivityPubUrl
|
||||
getVideoDislikesActivityPubUrl,
|
||||
getVideoCacheFileActivityPubUrl
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue