mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Playlist server API
This commit is contained in:
parent
b427febb4d
commit
418d092afa
63 changed files with 2758 additions and 226 deletions
|
@ -7,11 +7,21 @@ import { VideoCommentModel } from '../../models/video/video-comment'
|
|||
import { VideoFileModel } from '../../models/video/video-file'
|
||||
import { VideoStreamingPlaylist } from '../../../shared/models/videos/video-streaming-playlist.model'
|
||||
import { VideoStreamingPlaylistModel } from '../../models/video/video-streaming-playlist'
|
||||
import { VideoPlaylistModel } from '../../models/video/video-playlist'
|
||||
import { VideoPlaylistElementModel } from '../../models/video/video-playlist-element'
|
||||
|
||||
function getVideoActivityPubUrl (video: VideoModel) {
|
||||
return CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid
|
||||
}
|
||||
|
||||
function getVideoPlaylistActivityPubUrl (videoPlaylist: VideoPlaylistModel) {
|
||||
return CONFIG.WEBSERVER.URL + '/video-playlists/' + videoPlaylist.uuid
|
||||
}
|
||||
|
||||
function getVideoPlaylistElementActivityPubUrl (videoPlaylist: VideoPlaylistModel, video: VideoModel) {
|
||||
return CONFIG.WEBSERVER.URL + '/video-playlists/' + videoPlaylist.uuid + '/' + video.uuid
|
||||
}
|
||||
|
||||
function getVideoCacheFileActivityPubUrl (videoFile: VideoFileModel) {
|
||||
const suffixFPS = videoFile.fps && videoFile.fps !== -1 ? '-' + videoFile.fps : ''
|
||||
|
||||
|
@ -98,6 +108,8 @@ function getUndoActivityPubUrl (originalUrl: string) {
|
|||
|
||||
export {
|
||||
getVideoActivityPubUrl,
|
||||
getVideoPlaylistElementActivityPubUrl,
|
||||
getVideoPlaylistActivityPubUrl,
|
||||
getVideoCacheStreamingPlaylistActivityPubUrl,
|
||||
getVideoChannelActivityPubUrl,
|
||||
getAccountActivityPubUrl,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue