mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 01:39:37 +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 {
|
||||
BooleanBothQuery,
|
||||
FeedFormat,
|
||||
FeedFormatType,
|
||||
FeedType,
|
||||
FeedType_Type,
|
||||
NSFWPolicyType,
|
||||
ResultList,
|
||||
ServerErrorCode,
|
||||
|
@ -200,18 +203,21 @@ export class VideoService {
|
|||
}
|
||||
|
||||
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,
|
||||
label: 'media rss 2.0',
|
||||
url: base + FeedFormat.RSS.toLowerCase()
|
||||
},
|
||||
{
|
||||
type: FeedType.VIDEOS,
|
||||
format: FeedFormat.ATOM,
|
||||
label: 'atom 1.0',
|
||||
url: base + FeedFormat.ATOM.toLowerCase()
|
||||
},
|
||||
{
|
||||
type: FeedType.VIDEOS,
|
||||
format: FeedFormat.JSON,
|
||||
label: 'json 1.0',
|
||||
url: base + FeedFormat.JSON.toLowerCase()
|
||||
|
@ -255,6 +261,7 @@ export class VideoService {
|
|||
const feedUrls = this.buildBaseFeedUrls(params)
|
||||
|
||||
feedUrls.push({
|
||||
type: FeedType.PODCAST,
|
||||
format: FeedFormat.PODCAST,
|
||||
label: 'podcast rss 2.0',
|
||||
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 { AuthService, Notifier, RedirectService } from '@app/core'
|
||||
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 { Account } from '../shared-main/account/account.model'
|
||||
import { VideoChannel } from '../shared-main/channel/video-channel.model'
|
||||
|
@ -84,7 +84,7 @@ export class SubscribeButtonComponent implements OnChanges {
|
|||
? undefined
|
||||
: this.videoService
|
||||
.getVideoChannelFeedUrls(this.videoChannels()[0].id)
|
||||
.find(i => i.format === FeedFormat.PODCAST)
|
||||
.find(i => i.type === FeedType.PODCAST)
|
||||
.url
|
||||
}
|
||||
|
||||
|
|
|
@ -17,17 +17,23 @@ export class FFmpegContainer {
|
|||
}) {
|
||||
const { inputs, output, logError, coverPath } = options
|
||||
|
||||
this.commandWrapper.buildCommand(inputs)
|
||||
.outputOption('-c copy')
|
||||
.outputOption('-movflags frag_keyframe+empty_moov')
|
||||
.format('mp4')
|
||||
.output(output)
|
||||
const command = this.commandWrapper.buildCommand(inputs)
|
||||
|
||||
for (let i = 0; i < inputs.length; i++) {
|
||||
command.outputOption('-map ' + i)
|
||||
}
|
||||
|
||||
if (coverPath) {
|
||||
this.commandWrapper.getCommand()
|
||||
.addInput(coverPath)
|
||||
command.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 })
|
||||
}
|
||||
|
||||
|
|
|
@ -6,3 +6,10 @@ export const FeedFormat = {
|
|||
} as const
|
||||
|
||||
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,
|
||||
videoFiles: files.map(f => f.id),
|
||||
videoUUID: video.uuid,
|
||||
extension: videoFile.hasVideo() && videoFile.hasAudio()
|
||||
extension: videoFile.hasVideo()
|
||||
? '.mp4'
|
||||
: '.m4a'
|
||||
})
|
||||
|
|
|
@ -111,8 +111,8 @@ server {
|
|||
}
|
||||
|
||||
location ~ ^/api/v1/(videos|video-playlists|video-channels|users/me) {
|
||||
client_max_body_size 6M; # 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)
|
||||
client_max_body_size 12M; # default is 1M
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue