mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 09:49:20 +02:00
Merge branch 'release/7.1.0' into develop
This commit is contained in:
commit
45da32cdd7
6 changed files with 33 additions and 13 deletions
|
@ -15,6 +15,9 @@ import { arrayify, buildDownloadFilesUrl, exists } from '@peertube/peertube-core
|
||||||
import {
|
import {
|
||||||
BooleanBothQuery,
|
BooleanBothQuery,
|
||||||
FeedFormat,
|
FeedFormat,
|
||||||
|
FeedFormatType,
|
||||||
|
FeedType,
|
||||||
|
FeedType_Type,
|
||||||
NSFWPolicyType,
|
NSFWPolicyType,
|
||||||
ResultList,
|
ResultList,
|
||||||
ServerErrorCode,
|
ServerErrorCode,
|
||||||
|
@ -200,18 +203,21 @@ export class VideoService {
|
||||||
}
|
}
|
||||||
|
|
||||||
buildBaseFeedUrls (params: HttpParams, base = VideoService.BASE_FEEDS_URL) {
|
buildBaseFeedUrls (params: HttpParams, base = VideoService.BASE_FEEDS_URL) {
|
||||||
const feeds = [
|
const feeds: { type: FeedType_Type, format: FeedFormatType, label: string, url: string }[] = [
|
||||||
{
|
{
|
||||||
|
type: FeedType.VIDEOS,
|
||||||
format: FeedFormat.RSS,
|
format: FeedFormat.RSS,
|
||||||
label: 'media rss 2.0',
|
label: 'media rss 2.0',
|
||||||
url: base + FeedFormat.RSS.toLowerCase()
|
url: base + FeedFormat.RSS.toLowerCase()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
type: FeedType.VIDEOS,
|
||||||
format: FeedFormat.ATOM,
|
format: FeedFormat.ATOM,
|
||||||
label: 'atom 1.0',
|
label: 'atom 1.0',
|
||||||
url: base + FeedFormat.ATOM.toLowerCase()
|
url: base + FeedFormat.ATOM.toLowerCase()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
type: FeedType.VIDEOS,
|
||||||
format: FeedFormat.JSON,
|
format: FeedFormat.JSON,
|
||||||
label: 'json 1.0',
|
label: 'json 1.0',
|
||||||
url: base + FeedFormat.JSON.toLowerCase()
|
url: base + FeedFormat.JSON.toLowerCase()
|
||||||
|
@ -255,6 +261,7 @@ export class VideoService {
|
||||||
const feedUrls = this.buildBaseFeedUrls(params)
|
const feedUrls = this.buildBaseFeedUrls(params)
|
||||||
|
|
||||||
feedUrls.push({
|
feedUrls.push({
|
||||||
|
type: FeedType.PODCAST,
|
||||||
format: FeedFormat.PODCAST,
|
format: FeedFormat.PODCAST,
|
||||||
label: 'podcast rss 2.0',
|
label: 'podcast rss 2.0',
|
||||||
url: VideoService.PODCAST_FEEDS_URL + `?videoChannelId=${videoChannelId}`
|
url: VideoService.PODCAST_FEEDS_URL + `?videoChannelId=${videoChannelId}`
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { NgClass, NgIf, NgTemplateOutlet } from '@angular/common'
|
||||||
import { Component, OnChanges, inject, input, viewChild } from '@angular/core'
|
import { Component, OnChanges, inject, input, viewChild } from '@angular/core'
|
||||||
import { AuthService, Notifier, RedirectService } from '@app/core'
|
import { AuthService, Notifier, RedirectService } from '@app/core'
|
||||||
import { NgbDropdown, NgbDropdownMenu, NgbDropdownToggle } from '@ng-bootstrap/ng-bootstrap'
|
import { NgbDropdown, NgbDropdownMenu, NgbDropdownToggle } from '@ng-bootstrap/ng-bootstrap'
|
||||||
import { FeedFormat } from '@peertube/peertube-models'
|
import { FeedFormat, FeedType } from '@peertube/peertube-models'
|
||||||
import { concat, forkJoin, merge } from 'rxjs'
|
import { concat, forkJoin, merge } from 'rxjs'
|
||||||
import { Account } from '../shared-main/account/account.model'
|
import { Account } from '../shared-main/account/account.model'
|
||||||
import { VideoChannel } from '../shared-main/channel/video-channel.model'
|
import { VideoChannel } from '../shared-main/channel/video-channel.model'
|
||||||
|
@ -84,7 +84,7 @@ export class SubscribeButtonComponent implements OnChanges {
|
||||||
? undefined
|
? undefined
|
||||||
: this.videoService
|
: this.videoService
|
||||||
.getVideoChannelFeedUrls(this.videoChannels()[0].id)
|
.getVideoChannelFeedUrls(this.videoChannels()[0].id)
|
||||||
.find(i => i.format === FeedFormat.PODCAST)
|
.find(i => i.type === FeedType.PODCAST)
|
||||||
.url
|
.url
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,17 +17,23 @@ export class FFmpegContainer {
|
||||||
}) {
|
}) {
|
||||||
const { inputs, output, logError, coverPath } = options
|
const { inputs, output, logError, coverPath } = options
|
||||||
|
|
||||||
this.commandWrapper.buildCommand(inputs)
|
const command = this.commandWrapper.buildCommand(inputs)
|
||||||
.outputOption('-c copy')
|
|
||||||
.outputOption('-movflags frag_keyframe+empty_moov')
|
for (let i = 0; i < inputs.length; i++) {
|
||||||
.format('mp4')
|
command.outputOption('-map ' + i)
|
||||||
.output(output)
|
}
|
||||||
|
|
||||||
if (coverPath) {
|
if (coverPath) {
|
||||||
this.commandWrapper.getCommand()
|
command.addInput(coverPath)
|
||||||
.addInput(coverPath)
|
command.outputOption('-map ' + inputs.length)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
command.outputOption('-c copy')
|
||||||
|
.outputOption('-movflags frag_every_frame+empty_moov')
|
||||||
|
.outputOption('-min_frag_duration 5M') // 5 seconds
|
||||||
|
.format('mp4')
|
||||||
|
.output(output)
|
||||||
|
|
||||||
return this.commandWrapper.runCommand({ silent: !logError })
|
return this.commandWrapper.runCommand({ silent: !logError })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,3 +6,10 @@ export const FeedFormat = {
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type FeedFormatType = typeof FeedFormat[keyof typeof FeedFormat]
|
export type FeedFormatType = typeof FeedFormat[keyof typeof FeedFormat]
|
||||||
|
|
||||||
|
export const FeedType = {
|
||||||
|
VIDEOS: 'videos',
|
||||||
|
PODCAST: 'podcast'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type FeedType_Type = typeof FeedType[keyof typeof FeedType]
|
||||||
|
|
|
@ -301,7 +301,7 @@ function buildVODStreamingPlaylists (video: MVideoFullLight) {
|
||||||
baseUrl: WEBSERVER.URL,
|
baseUrl: WEBSERVER.URL,
|
||||||
videoFiles: files.map(f => f.id),
|
videoFiles: files.map(f => f.id),
|
||||||
videoUUID: video.uuid,
|
videoUUID: video.uuid,
|
||||||
extension: videoFile.hasVideo() && videoFile.hasAudio()
|
extension: videoFile.hasVideo()
|
||||||
? '.mp4'
|
? '.mp4'
|
||||||
: '.m4a'
|
: '.m4a'
|
||||||
})
|
})
|
||||||
|
|
|
@ -111,8 +111,8 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^/api/v1/(videos|video-playlists|video-channels|users/me) {
|
location ~ ^/api/v1/(videos|video-playlists|video-channels|users/me) {
|
||||||
client_max_body_size 6M; # default is 1M
|
client_max_body_size 12M; # default is 1M
|
||||||
add_header X-File-Maximum-Size 4M always; # inform backend of the set value in bytes before mime-encoding (x * 1.4 >= client_max_body_size)
|
add_header X-File-Maximum-Size 8M always; # inform backend of the set value in bytes before mime-encoding (x * 1.4 >= client_max_body_size)
|
||||||
|
|
||||||
try_files /dev/null @api;
|
try_files /dev/null @api;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue