Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Framasoft
PeerTube
PeerTube
Commits
86c5229b
Verified
Commit
86c5229b
authored
May 02, 2022
by
Chocobozzz
Browse files
Save replay of permanent live in client
parent
98ebfa39
Changes
5
Hide whitespace changes
Inline
Side-by-side
client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html
View file @
86c5229b
...
...
@@ -30,9 +30,6 @@
inputName=
"liveAllowReplay"
formControlName=
"allowReplay"
i18n-labelText
labelText=
"Allow your users to automatically publish a replay of their live"
>
<ng-container
ngProjectAs=
"description"
i18n
>
If the user quota is reached, PeerTube will automatically terminate the live streaming
</ng-container>
</my-peertube-checkbox>
</div>
...
...
client/src/app/+videos/+video-edit/shared/video-edit.component.ts
View file @
86c5229b
...
...
@@ -180,7 +180,6 @@ export class VideoEditComponent implements OnInit, OnDestroy {
this
.
trackChannelChange
()
this
.
trackPrivacyChange
()
this
.
trackLivePermanentFieldChange
()
this
.
formBuilt
.
emit
()
}
...
...
@@ -457,24 +456,6 @@ export class VideoEditComponent implements OnInit, OnDestroy {
)
}
private
trackLivePermanentFieldChange
()
{
// We will update the "support" field depending on the channel
this
.
form
.
controls
[
'
permanentLive
'
]
.
valueChanges
.
subscribe
(
permanentLive
=>
{
const
saveReplayControl
=
this
.
form
.
controls
[
'
saveReplay
'
]
if
(
permanentLive
===
true
)
{
saveReplayControl
.
setValue
(
false
)
saveReplayControl
.
disable
()
}
else
{
saveReplayControl
.
enable
()
}
}
)
}
private
updateSupportField
(
support
:
string
)
{
return
this
.
form
.
patchValue
({
support
:
support
||
''
})
}
...
...
client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts
View file @
86c5229b
...
...
@@ -71,7 +71,7 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, AfterView
nsfw
:
this
.
serverConfig
.
instance
.
isNSFW
,
waitTranscoding
:
true
,
permanentLive
:
this
.
firstStepPermanentLive
,
saveReplay
:
this
.
firstStepPermanentLive
===
false
&&
this
.
isReplayAllowed
(),
saveReplay
:
this
.
isReplayAllowed
(),
channelId
:
this
.
firstStepChannelId
}
...
...
server/middlewares/validators/videos/video-live.ts
View file @
86c5229b
...
...
@@ -170,10 +170,6 @@ const videoLiveUpdateValidator = [
const
body
:
LiveVideoUpdate
=
req
.
body
if
(
body
.
permanentLive
&&
body
.
saveReplay
)
{
return
res
.
fail
({
message
:
'
Cannot set this live as permanent while saving its replay
'
})
}
if
(
hasValidSaveReplay
(
body
)
!==
true
)
{
return
res
.
fail
({
status
:
HttpStatusCode
.
FORBIDDEN_403
,
...
...
server/tests/api/check-params/live.ts
View file @
86c5229b
...
...
@@ -414,12 +414,6 @@ describe('Test video lives API validator', function () {
await
command
.
update
({
videoId
:
videoIdNotLive
,
fields
:
{},
expectedStatus
:
HttpStatusCode
.
NOT_FOUND_404
})
})
it
(
'
Should fail with save replay and permanent live set to true
'
,
async
function
()
{
const
fields
=
{
saveReplay
:
true
,
permanentLive
:
true
}
await
command
.
update
({
videoId
:
video
.
id
,
fields
,
expectedStatus
:
HttpStatusCode
.
BAD_REQUEST_400
})
})
it
(
'
Should fail with bad latency setting
'
,
async
function
()
{
const
fields
=
{
latencyMode
:
42
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment