diff options
Diffstat (limited to 'support')
-rw-r--r-- | support/doc/api/embeds.md | 8 | ||||
-rw-r--r-- | support/doc/api/openapi.yaml | 207 | ||||
-rw-r--r-- | support/doc/development/lib.md | 2 | ||||
-rw-r--r-- | support/doc/development/release.md | 8 | ||||
-rw-r--r-- | support/doc/development/tests.md | 1 | ||||
-rw-r--r-- | support/doc/tools.md | 42 | ||||
-rw-r--r-- | support/docker/production/config/custom-environment-variables.yaml | 16 | ||||
-rw-r--r-- | support/docker/production/config/production.yaml | 2 | ||||
-rw-r--r-- | support/nginx/peertube | 34 |
9 files changed, 245 insertions, 75 deletions
diff --git a/support/doc/api/embeds.md b/support/doc/api/embeds.md index 1dd1443e7..fd5507e38 100644 --- a/support/doc/api/embeds.md +++ b/support/doc/api/embeds.md | |||
@@ -52,7 +52,7 @@ player.pause() | |||
52 | ## Embed URL parameters | 52 | ## Embed URL parameters |
53 | 53 | ||
54 | You can customize PeerTube player by specifying URL query parameters. | 54 | You can customize PeerTube player by specifying URL query parameters. |
55 | For example `https://my-instance.example.com/videos/embed/52a10666-3a18-4e73-93da-e8d3c12c305a??start=1s&stop=18s&loop=1&autoplay=1&muted=1&warningTitle=0&controlBar=0&peertubeLink=0&p2p=0` | 55 | For example `https://my-instance.example.com/videos/embed/52a10666-3a18-4e73-93da-e8d3c12c305a?start=1s&stop=18s&loop=1&autoplay=1&muted=1&warningTitle=0&controlBar=0&peertubeLink=0&p2p=0` |
56 | 56 | ||
57 | ### start | 57 | ### start |
58 | 58 | ||
@@ -108,6 +108,10 @@ Most web browsers disable video autoplay if the user did not interact with the v | |||
108 | 108 | ||
109 | Value must be `0` or `1`. | 109 | Value must be `0` or `1`. |
110 | 110 | ||
111 | ### playbackRate | ||
112 | |||
113 | Force the default playback rate (`0.75`, `1.5` etc). | ||
114 | |||
111 | ### title | 115 | ### title |
112 | 116 | ||
113 | Hide embed title. | 117 | Hide embed title. |
@@ -142,7 +146,7 @@ Value must be a valid color (`red` or `rgba(100, 100, 100, 0.5)`). | |||
142 | 146 | ||
143 | Force a specific player engine. | 147 | Force a specific player engine. |
144 | 148 | ||
145 | Value must be a valid mode (`webtorrent` or `p2p-media-loader`). | 149 | Value must be a valid mode (`web-video` or `p2p-media-loader`). |
146 | 150 | ||
147 | ### api | 151 | ### api |
148 | 152 | ||
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index cd50e86a6..2dfad9987 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml | |||
@@ -300,6 +300,8 @@ tags: | |||
300 | - name: Runner Registration Token | 300 | - name: Runner Registration Token |
301 | description: | | 301 | description: | |
302 | Manage runner registration token | 302 | Manage runner registration token |
303 | - name: Video Passwords | ||
304 | description: Operation on video passwords | ||
303 | 305 | ||
304 | x-tagGroups: | 306 | x-tagGroups: |
305 | - name: Static endpoints | 307 | - name: Static endpoints |
@@ -337,6 +339,7 @@ x-tagGroups: | |||
337 | - Video Transcoding | 339 | - Video Transcoding |
338 | - Live Videos | 340 | - Live Videos |
339 | - Channels Sync | 341 | - Channels Sync |
342 | - Video Passwords | ||
340 | - name: Search | 343 | - name: Search |
341 | tags: | 344 | tags: |
342 | - Search | 345 | - Search |
@@ -363,11 +366,11 @@ x-tagGroups: | |||
363 | - Runners | 366 | - Runners |
364 | 367 | ||
365 | paths: | 368 | paths: |
366 | '/static/webseed/{filename}': | 369 | '/static/web-videos/{filename}': |
367 | get: | 370 | get: |
368 | tags: | 371 | tags: |
369 | - Static Video Files | 372 | - Static Video Files |
370 | summary: Get public WebTorrent video file | 373 | summary: Get public Web Video file |
371 | parameters: | 374 | parameters: |
372 | - $ref: '#/components/parameters/staticFilename' | 375 | - $ref: '#/components/parameters/staticFilename' |
373 | responses: | 376 | responses: |
@@ -375,11 +378,11 @@ paths: | |||
375 | description: successful operation | 378 | description: successful operation |
376 | '404': | 379 | '404': |
377 | description: not found | 380 | description: not found |
378 | '/static/webseed/private/{filename}': | 381 | '/static/web-videos/private/{filename}': |
379 | get: | 382 | get: |
380 | tags: | 383 | tags: |
381 | - Static Video Files | 384 | - Static Video Files |
382 | summary: Get private WebTorrent video file | 385 | summary: Get private Web Video file |
383 | parameters: | 386 | parameters: |
384 | - $ref: '#/components/parameters/staticFilename' | 387 | - $ref: '#/components/parameters/staticFilename' |
385 | - $ref: '#/components/parameters/videoFileToken' | 388 | - $ref: '#/components/parameters/videoFileToken' |
@@ -571,7 +574,7 @@ paths: | |||
571 | - $ref: '#/components/parameters/include' | 574 | - $ref: '#/components/parameters/include' |
572 | - $ref: '#/components/parameters/privacyOneOf' | 575 | - $ref: '#/components/parameters/privacyOneOf' |
573 | - $ref: '#/components/parameters/hasHLSFiles' | 576 | - $ref: '#/components/parameters/hasHLSFiles' |
574 | - $ref: '#/components/parameters/hasWebtorrentFiles' | 577 | - $ref: '#/components/parameters/hasWebVideoFiles' |
575 | responses: | 578 | responses: |
576 | '200': | 579 | '200': |
577 | description: successful operation | 580 | description: successful operation |
@@ -655,7 +658,7 @@ paths: | |||
655 | - $ref: '#/components/parameters/include' | 658 | - $ref: '#/components/parameters/include' |
656 | - $ref: '#/components/parameters/privacyOneOf' | 659 | - $ref: '#/components/parameters/privacyOneOf' |
657 | - $ref: '#/components/parameters/hasHLSFiles' | 660 | - $ref: '#/components/parameters/hasHLSFiles' |
658 | - $ref: '#/components/parameters/hasWebtorrentFiles' | 661 | - $ref: '#/components/parameters/hasWebVideoFiles' |
659 | responses: | 662 | responses: |
660 | '200': | 663 | '200': |
661 | description: successful operation | 664 | description: successful operation |
@@ -745,7 +748,7 @@ paths: | |||
745 | - $ref: '#/components/parameters/include' | 748 | - $ref: '#/components/parameters/include' |
746 | - $ref: '#/components/parameters/privacyOneOf' | 749 | - $ref: '#/components/parameters/privacyOneOf' |
747 | - $ref: '#/components/parameters/hasHLSFiles' | 750 | - $ref: '#/components/parameters/hasHLSFiles' |
748 | - $ref: '#/components/parameters/hasWebtorrentFiles' | 751 | - $ref: '#/components/parameters/hasWebVideoFiles' |
749 | - $ref: '#/components/parameters/skipCount' | 752 | - $ref: '#/components/parameters/skipCount' |
750 | - $ref: '#/components/parameters/start' | 753 | - $ref: '#/components/parameters/start' |
751 | - $ref: '#/components/parameters/count' | 754 | - $ref: '#/components/parameters/count' |
@@ -915,7 +918,7 @@ paths: | |||
915 | description: > | 918 | description: > |
916 | Arises when: | 919 | Arises when: |
917 | - the emailer is disabled and the instance is open to registrations | 920 | - the emailer is disabled and the instance is open to registrations |
918 | - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled | 921 | - web videos and hls are disabled with transcoding enabled - you need at least one enabled |
919 | delete: | 922 | delete: |
920 | summary: Delete instance runtime configuration | 923 | summary: Delete instance runtime configuration |
921 | operationId: delCustomConfig | 924 | operationId: delCustomConfig |
@@ -1870,7 +1873,7 @@ paths: | |||
1870 | - $ref: '#/components/parameters/include' | 1873 | - $ref: '#/components/parameters/include' |
1871 | - $ref: '#/components/parameters/privacyOneOf' | 1874 | - $ref: '#/components/parameters/privacyOneOf' |
1872 | - $ref: '#/components/parameters/hasHLSFiles' | 1875 | - $ref: '#/components/parameters/hasHLSFiles' |
1873 | - $ref: '#/components/parameters/hasWebtorrentFiles' | 1876 | - $ref: '#/components/parameters/hasWebVideoFiles' |
1874 | - $ref: '#/components/parameters/skipCount' | 1877 | - $ref: '#/components/parameters/skipCount' |
1875 | - $ref: '#/components/parameters/start' | 1878 | - $ref: '#/components/parameters/start' |
1876 | - $ref: '#/components/parameters/count' | 1879 | - $ref: '#/components/parameters/count' |
@@ -2359,6 +2362,7 @@ paths: | |||
2359 | - OAuth2: [] | 2362 | - OAuth2: [] |
2360 | parameters: | 2363 | parameters: |
2361 | - $ref: '#/components/parameters/idOrUUID' | 2364 | - $ref: '#/components/parameters/idOrUUID' |
2365 | - $ref: '#/components/parameters/videoPasswordHeader' | ||
2362 | responses: | 2366 | responses: |
2363 | '200': | 2367 | '200': |
2364 | description: successful operation | 2368 | description: successful operation |
@@ -2414,7 +2418,7 @@ paths: | |||
2414 | - $ref: '#/components/parameters/include' | 2418 | - $ref: '#/components/parameters/include' |
2415 | - $ref: '#/components/parameters/privacyOneOf' | 2419 | - $ref: '#/components/parameters/privacyOneOf' |
2416 | - $ref: '#/components/parameters/hasHLSFiles' | 2420 | - $ref: '#/components/parameters/hasHLSFiles' |
2417 | - $ref: '#/components/parameters/hasWebtorrentFiles' | 2421 | - $ref: '#/components/parameters/hasWebVideoFiles' |
2418 | - $ref: '#/components/parameters/skipCount' | 2422 | - $ref: '#/components/parameters/skipCount' |
2419 | - $ref: '#/components/parameters/start' | 2423 | - $ref: '#/components/parameters/start' |
2420 | - $ref: '#/components/parameters/count' | 2424 | - $ref: '#/components/parameters/count' |
@@ -2578,6 +2582,8 @@ paths: | |||
2578 | format: date-time | 2582 | format: date-time |
2579 | scheduleUpdate: | 2583 | scheduleUpdate: |
2580 | $ref: '#/components/schemas/VideoScheduledUpdate' | 2584 | $ref: '#/components/schemas/VideoScheduledUpdate' |
2585 | videoPasswords: | ||
2586 | $ref: '#/components/schemas/AddVideoPasswords' | ||
2581 | encoding: | 2587 | encoding: |
2582 | thumbnailfile: | 2588 | thumbnailfile: |
2583 | contentType: image/jpeg | 2589 | contentType: image/jpeg |
@@ -2590,6 +2596,7 @@ paths: | |||
2590 | - Video | 2596 | - Video |
2591 | parameters: | 2597 | parameters: |
2592 | - $ref: '#/components/parameters/idOrUUID' | 2598 | - $ref: '#/components/parameters/idOrUUID' |
2599 | - $ref: '#/components/parameters/videoPasswordHeader' | ||
2593 | responses: | 2600 | responses: |
2594 | '200': | 2601 | '200': |
2595 | description: successful operation | 2602 | description: successful operation |
@@ -2597,6 +2604,8 @@ paths: | |||
2597 | application/json: | 2604 | application/json: |
2598 | schema: | 2605 | schema: |
2599 | $ref: '#/components/schemas/VideoDetails' | 2606 | $ref: '#/components/schemas/VideoDetails' |
2607 | '403': | ||
2608 | description: provide a correct password to access this password protected video | ||
2600 | delete: | 2609 | delete: |
2601 | summary: Delete a video | 2610 | summary: Delete a video |
2602 | operationId: delVideo | 2611 | operationId: delVideo |
@@ -2618,6 +2627,7 @@ paths: | |||
2618 | - Video | 2627 | - Video |
2619 | parameters: | 2628 | parameters: |
2620 | - $ref: '#/components/parameters/idOrUUID' | 2629 | - $ref: '#/components/parameters/idOrUUID' |
2630 | - $ref: '#/components/parameters/videoPasswordHeader' | ||
2621 | responses: | 2631 | responses: |
2622 | '200': | 2632 | '200': |
2623 | description: successful operation | 2633 | description: successful operation |
@@ -3267,6 +3277,7 @@ paths: | |||
3267 | - Live Videos | 3277 | - Live Videos |
3268 | parameters: | 3278 | parameters: |
3269 | - $ref: '#/components/parameters/idOrUUID' | 3279 | - $ref: '#/components/parameters/idOrUUID' |
3280 | - $ref: '#/components/parameters/videoPasswordHeader' | ||
3270 | responses: | 3281 | responses: |
3271 | '200': | 3282 | '200': |
3272 | description: successful operation | 3283 | description: successful operation |
@@ -3657,6 +3668,27 @@ paths: | |||
3657 | items: | 3668 | items: |
3658 | $ref: '#/components/schemas/VideoBlacklist' | 3669 | $ref: '#/components/schemas/VideoBlacklist' |
3659 | 3670 | ||
3671 | /api/v1/videos/{id}/storyboards: | ||
3672 | get: | ||
3673 | summary: List storyboards of a video | ||
3674 | operationId: listVideoStoryboards | ||
3675 | tags: | ||
3676 | - Video | ||
3677 | parameters: | ||
3678 | - $ref: '#/components/parameters/idOrUUID' | ||
3679 | responses: | ||
3680 | '200': | ||
3681 | description: successful operation | ||
3682 | content: | ||
3683 | application/json: | ||
3684 | schema: | ||
3685 | type: object | ||
3686 | properties: | ||
3687 | storyboards: | ||
3688 | type: array | ||
3689 | items: | ||
3690 | $ref: '#/components/schemas/Storyboard' | ||
3691 | |||
3660 | /api/v1/videos/{id}/captions: | 3692 | /api/v1/videos/{id}/captions: |
3661 | get: | 3693 | get: |
3662 | summary: List captions of a video | 3694 | summary: List captions of a video |
@@ -3665,6 +3697,7 @@ paths: | |||
3665 | - Video Captions | 3697 | - Video Captions |
3666 | parameters: | 3698 | parameters: |
3667 | - $ref: '#/components/parameters/idOrUUID' | 3699 | - $ref: '#/components/parameters/idOrUUID' |
3700 | - $ref: '#/components/parameters/videoPasswordHeader' | ||
3668 | responses: | 3701 | responses: |
3669 | '200': | 3702 | '200': |
3670 | description: successful operation | 3703 | description: successful operation |
@@ -3728,6 +3761,70 @@ paths: | |||
3728 | '404': | 3761 | '404': |
3729 | description: video or language or caption for that language not found | 3762 | description: video or language or caption for that language not found |
3730 | 3763 | ||
3764 | /api/v1/videos/{id}/passwords: | ||
3765 | get: | ||
3766 | summary: List video passwords | ||
3767 | security: | ||
3768 | - OAuth2: | ||
3769 | - user | ||
3770 | tags: | ||
3771 | - Video Passwords | ||
3772 | parameters: | ||
3773 | - $ref: '#/components/parameters/idOrUUID' | ||
3774 | - $ref: '#/components/parameters/start' | ||
3775 | - $ref: '#/components/parameters/count' | ||
3776 | - $ref: '#/components/parameters/sort' | ||
3777 | responses: | ||
3778 | '204': | ||
3779 | description: successful operation | ||
3780 | content: | ||
3781 | application/json: | ||
3782 | schema: | ||
3783 | $ref: '#/components/schemas/VideoPasswordList' | ||
3784 | '400': | ||
3785 | description: video is not password protected | ||
3786 | put: | ||
3787 | summary: Update video passwords | ||
3788 | security: | ||
3789 | - OAuth2: | ||
3790 | - user | ||
3791 | tags: | ||
3792 | - Video Passwords | ||
3793 | parameters: | ||
3794 | - $ref: '#/components/parameters/idOrUUID' | ||
3795 | requestBody: | ||
3796 | content: | ||
3797 | application/json: | ||
3798 | schema: | ||
3799 | type: object | ||
3800 | properties: | ||
3801 | passwords: | ||
3802 | $ref: '#/components/schemas/AddVideoPasswords' | ||
3803 | responses: | ||
3804 | '204': | ||
3805 | description: successful operation | ||
3806 | '400': | ||
3807 | description: video is not password protected | ||
3808 | |||
3809 | /api/v1/videos/{id}/passwords/{videoPasswordId}: | ||
3810 | delete: | ||
3811 | summary: Delete a video password | ||
3812 | security: | ||
3813 | - OAuth2: | ||
3814 | - user | ||
3815 | tags: | ||
3816 | - Video Passwords | ||
3817 | parameters: | ||
3818 | - $ref: '#/components/parameters/idOrUUID' | ||
3819 | - $ref: '#/components/parameters/videoPasswordId' | ||
3820 | responses: | ||
3821 | '204': | ||
3822 | description: successful operation | ||
3823 | '403': | ||
3824 | description: cannot delete the last password of the protected video | ||
3825 | '400': | ||
3826 | description: video is not password protected | ||
3827 | |||
3731 | /api/v1/video-channels: | 3828 | /api/v1/video-channels: |
3732 | get: | 3829 | get: |
3733 | summary: List video channels | 3830 | summary: List video channels |
@@ -3836,7 +3933,7 @@ paths: | |||
3836 | - $ref: '#/components/parameters/include' | 3933 | - $ref: '#/components/parameters/include' |
3837 | - $ref: '#/components/parameters/privacyOneOf' | 3934 | - $ref: '#/components/parameters/privacyOneOf' |
3838 | - $ref: '#/components/parameters/hasHLSFiles' | 3935 | - $ref: '#/components/parameters/hasHLSFiles' |
3839 | - $ref: '#/components/parameters/hasWebtorrentFiles' | 3936 | - $ref: '#/components/parameters/hasWebVideoFiles' |
3840 | - $ref: '#/components/parameters/skipCount' | 3937 | - $ref: '#/components/parameters/skipCount' |
3841 | - $ref: '#/components/parameters/start' | 3938 | - $ref: '#/components/parameters/start' |
3842 | - $ref: '#/components/parameters/count' | 3939 | - $ref: '#/components/parameters/count' |
@@ -4554,6 +4651,7 @@ paths: | |||
4554 | - $ref: '#/components/parameters/start' | 4651 | - $ref: '#/components/parameters/start' |
4555 | - $ref: '#/components/parameters/count' | 4652 | - $ref: '#/components/parameters/count' |
4556 | - $ref: '#/components/parameters/commentsSort' | 4653 | - $ref: '#/components/parameters/commentsSort' |
4654 | - $ref: '#/components/parameters/videoPasswordHeader' | ||
4557 | responses: | 4655 | responses: |
4558 | '200': | 4656 | '200': |
4559 | description: successful operation | 4657 | description: successful operation |
@@ -4600,6 +4698,7 @@ paths: | |||
4600 | parameters: | 4698 | parameters: |
4601 | - $ref: '#/components/parameters/idOrUUID' | 4699 | - $ref: '#/components/parameters/idOrUUID' |
4602 | - $ref: '#/components/parameters/threadId' | 4700 | - $ref: '#/components/parameters/threadId' |
4701 | - $ref: '#/components/parameters/videoPasswordHeader' | ||
4603 | responses: | 4702 | responses: |
4604 | '200': | 4703 | '200': |
4605 | description: successful operation | 4704 | description: successful operation |
@@ -4618,6 +4717,7 @@ paths: | |||
4618 | parameters: | 4717 | parameters: |
4619 | - $ref: '#/components/parameters/idOrUUID' | 4718 | - $ref: '#/components/parameters/idOrUUID' |
4620 | - $ref: '#/components/parameters/commentId' | 4719 | - $ref: '#/components/parameters/commentId' |
4720 | - $ref: '#/components/parameters/videoPasswordHeader' | ||
4621 | responses: | 4721 | responses: |
4622 | '200': | 4722 | '200': |
4623 | description: successful operation | 4723 | description: successful operation |
@@ -4668,6 +4768,7 @@ paths: | |||
4668 | - Video Rates | 4768 | - Video Rates |
4669 | parameters: | 4769 | parameters: |
4670 | - $ref: '#/components/parameters/idOrUUID' | 4770 | - $ref: '#/components/parameters/idOrUUID' |
4771 | - $ref: '#/components/parameters/videoPasswordHeader' | ||
4671 | requestBody: | 4772 | requestBody: |
4672 | content: | 4773 | content: |
4673 | application/json: | 4774 | application/json: |
@@ -4703,15 +4804,15 @@ paths: | |||
4703 | description: successful operation | 4804 | description: successful operation |
4704 | '404': | 4805 | '404': |
4705 | description: video does not exist | 4806 | description: video does not exist |
4706 | '/api/v1/videos/{id}/webtorrent': | 4807 | '/api/v1/videos/{id}/web-videos': |
4707 | delete: | 4808 | delete: |
4708 | summary: Delete video WebTorrent files | 4809 | summary: Delete video Web Video files |
4709 | security: | 4810 | security: |
4710 | - OAuth2: | 4811 | - OAuth2: |
4711 | - admin | 4812 | - admin |
4712 | tags: | 4813 | tags: |
4713 | - Video Files | 4814 | - Video Files |
4714 | operationId: delVideoWebTorrent | 4815 | operationId: delVideoWebVideos |
4715 | parameters: | 4816 | parameters: |
4716 | - $ref: '#/components/parameters/idOrUUID' | 4817 | - $ref: '#/components/parameters/idOrUUID' |
4717 | responses: | 4818 | responses: |
@@ -4741,7 +4842,7 @@ paths: | |||
4741 | type: string | 4842 | type: string |
4742 | enum: | 4843 | enum: |
4743 | - hls | 4844 | - hls |
4744 | - webtorrent | 4845 | - web-video |
4745 | required: | 4846 | required: |
4746 | - transcodingType | 4847 | - transcodingType |
4747 | responses: | 4848 | responses: |
@@ -4779,7 +4880,7 @@ paths: | |||
4779 | - $ref: '#/components/parameters/privacyOneOf' | 4880 | - $ref: '#/components/parameters/privacyOneOf' |
4780 | - $ref: '#/components/parameters/uuids' | 4881 | - $ref: '#/components/parameters/uuids' |
4781 | - $ref: '#/components/parameters/hasHLSFiles' | 4882 | - $ref: '#/components/parameters/hasHLSFiles' |
4782 | - $ref: '#/components/parameters/hasWebtorrentFiles' | 4883 | - $ref: '#/components/parameters/hasWebVideoFiles' |
4783 | - $ref: '#/components/parameters/skipCount' | 4884 | - $ref: '#/components/parameters/skipCount' |
4784 | - $ref: '#/components/parameters/start' | 4885 | - $ref: '#/components/parameters/start' |
4785 | - $ref: '#/components/parameters/count' | 4886 | - $ref: '#/components/parameters/count' |
@@ -6370,13 +6471,13 @@ components: | |||
6370 | schema: | 6471 | schema: |
6371 | type: boolean | 6472 | type: boolean |
6372 | description: '**PeerTube >= 4.0** Display only videos that have HLS files' | 6473 | description: '**PeerTube >= 4.0** Display only videos that have HLS files' |
6373 | hasWebtorrentFiles: | 6474 | hasWebVideoFiles: |
6374 | name: hasWebtorrentFiles | 6475 | name: hasWebVideoFiles |
6375 | in: query | 6476 | in: query |
6376 | required: false | 6477 | required: false |
6377 | schema: | 6478 | schema: |
6378 | type: boolean | 6479 | type: boolean |
6379 | description: '**PeerTube >= 4.0** Display only videos that have WebTorrent files' | 6480 | description: '**PeerTube >= 4.0** Display only videos that have Web Video files' |
6380 | privacyOneOf: | 6481 | privacyOneOf: |
6381 | name: privacyOneOf | 6482 | name: privacyOneOf |
6382 | in: query | 6483 | in: query |
@@ -6525,7 +6626,20 @@ components: | |||
6525 | required: true | 6626 | required: true |
6526 | schema: | 6627 | schema: |
6527 | $ref: '#/components/schemas/UUIDv4' | 6628 | $ref: '#/components/schemas/UUIDv4' |
6528 | 6629 | videoPasswordId: | |
6630 | name: videoPasswordId | ||
6631 | in: path | ||
6632 | required: true | ||
6633 | description: The video password id | ||
6634 | schema: | ||
6635 | $ref: '#/components/schemas/id' | ||
6636 | videoPasswordHeader: | ||
6637 | name: x-peertube-video-password | ||
6638 | description: Required on password protected video | ||
6639 | in: header | ||
6640 | required: false | ||
6641 | schema: | ||
6642 | type: string | ||
6529 | securitySchemes: | 6643 | securitySchemes: |
6530 | OAuth2: | 6644 | OAuth2: |
6531 | description: | | 6645 | description: | |
@@ -7015,7 +7129,7 @@ components: | |||
7015 | maxLength: 120 | 7129 | maxLength: 120 |
7016 | thumbnailPath: | 7130 | thumbnailPath: |
7017 | type: string | 7131 | type: string |
7018 | example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg | 7132 | example: /lazy-static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg |
7019 | previewPath: | 7133 | previewPath: |
7020 | type: string | 7134 | type: string |
7021 | example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg | 7135 | example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg |
@@ -7108,7 +7222,7 @@ components: | |||
7108 | items: | 7222 | items: |
7109 | $ref: '#/components/schemas/VideoFile' | 7223 | $ref: '#/components/schemas/VideoFile' |
7110 | description: | | 7224 | description: | |
7111 | WebTorrent/raw video files. If WebTorrent is disabled on the server: | 7225 | Web compatible video files. If Web Video is disabled on the server: |
7112 | 7226 | ||
7113 | - field will be empty | 7227 | - field will be empty |
7114 | - video files will be found in `streamingPlaylists[].files` field | 7228 | - video files will be found in `streamingPlaylists[].files` field |
@@ -7416,6 +7530,20 @@ components: | |||
7416 | type: array | 7530 | type: array |
7417 | items: | 7531 | items: |
7418 | $ref: '#/components/schemas/VideoCommentThreadTree' | 7532 | $ref: '#/components/schemas/VideoCommentThreadTree' |
7533 | Storyboard: | ||
7534 | properties: | ||
7535 | storyboardPath: | ||
7536 | type: string | ||
7537 | totalHeight: | ||
7538 | type: integer | ||
7539 | totalWidth: | ||
7540 | type: integer | ||
7541 | spriteHeight: | ||
7542 | type: integer | ||
7543 | spriteWidth: | ||
7544 | type: integer | ||
7545 | spriteDuration: | ||
7546 | type: integer | ||
7419 | VideoCaption: | 7547 | VideoCaption: |
7420 | properties: | 7548 | properties: |
7421 | language: | 7549 | language: |
@@ -7640,7 +7768,7 @@ components: | |||
7640 | properties: | 7768 | properties: |
7641 | enabled: | 7769 | enabled: |
7642 | type: boolean | 7770 | type: boolean |
7643 | webtorrent: | 7771 | web_videos: |
7644 | type: object | 7772 | type: object |
7645 | properties: | 7773 | properties: |
7646 | enabled: | 7774 | enabled: |
@@ -8006,15 +8134,15 @@ components: | |||
8006 | type: boolean | 8134 | type: boolean |
8007 | 2160p: | 8135 | 2160p: |
8008 | type: boolean | 8136 | type: boolean |
8009 | webtorrent: | 8137 | web_videos: |
8010 | type: object | 8138 | type: object |
8011 | description: WebTorrent-specific settings | 8139 | description: Web Video specific settings |
8012 | properties: | 8140 | properties: |
8013 | enabled: | 8141 | enabled: |
8014 | type: boolean | 8142 | type: boolean |
8015 | hls: | 8143 | hls: |
8016 | type: object | 8144 | type: object |
8017 | description: HLS-specific settings | 8145 | description: HLS specific settings |
8018 | properties: | 8146 | properties: |
8019 | enabled: | 8147 | enabled: |
8020 | type: boolean | 8148 | type: boolean |
@@ -8228,6 +8356,8 @@ components: | |||
8228 | description: Video preview file | 8356 | description: Video preview file |
8229 | type: string | 8357 | type: string |
8230 | format: binary | 8358 | format: binary |
8359 | videoPasswords: | ||
8360 | $ref: '#/components/schemas/AddVideoPasswords' | ||
8231 | required: | 8361 | required: |
8232 | - channelId | 8362 | - channelId |
8233 | - name | 8363 | - name |
@@ -9391,7 +9521,7 @@ components: | |||
9391 | type: string | 9521 | type: string |
9392 | enum: | 9522 | enum: |
9393 | - 'p2p-media-loader' | 9523 | - 'p2p-media-loader' |
9394 | - 'webtorrent' | 9524 | - 'web-video' |
9395 | resolution: | 9525 | resolution: |
9396 | type: number | 9526 | type: number |
9397 | description: Current player video resolution | 9527 | description: Current player video resolution |
@@ -9616,6 +9746,29 @@ components: | |||
9616 | privatePayload: | 9746 | privatePayload: |
9617 | type: object | 9747 | type: object |
9618 | 9748 | ||
9749 | VideoPassword: | ||
9750 | properties: | ||
9751 | id: | ||
9752 | $ref: '#/components/schemas/id' | ||
9753 | password: | ||
9754 | type: string | ||
9755 | minLength: 2 | ||
9756 | videoId: | ||
9757 | $ref: '#/components/schemas/id' | ||
9758 | VideoPasswordList: | ||
9759 | properties: | ||
9760 | total: | ||
9761 | type: integer | ||
9762 | example: 1 | ||
9763 | data: | ||
9764 | type: array | ||
9765 | items: | ||
9766 | $ref: '#/components/schemas/VideoPassword' | ||
9767 | AddVideoPasswords: | ||
9768 | type: array | ||
9769 | items: | ||
9770 | $ref: "#/components/schemas/VideoPassword/properties/password" | ||
9771 | uniqueItems: true | ||
9619 | callbacks: | 9772 | callbacks: |
9620 | searchIndex: | 9773 | searchIndex: |
9621 | 'https://search.example.org/api/v1/search/videos': | 9774 | 'https://search.example.org/api/v1/search/videos': |
diff --git a/support/doc/development/lib.md b/support/doc/development/lib.md index 3cccaf3d0..25fe3068e 100644 --- a/support/doc/development/lib.md +++ b/support/doc/development/lib.md | |||
@@ -5,7 +5,7 @@ | |||
5 | ### Build & Publish | 5 | ### Build & Publish |
6 | 6 | ||
7 | ``` | 7 | ``` |
8 | cd client/src/standalone/player/ | 8 | cd client/src/standalone/embed-player-api/ |
9 | npm run build | 9 | npm run build |
10 | npm publish --access=public | 10 | npm publish --access=public |
11 | ``` | 11 | ``` |
diff --git a/support/doc/development/release.md b/support/doc/development/release.md index c4935524c..81e35c58d 100644 --- a/support/doc/development/release.md +++ b/support/doc/development/release.md | |||
@@ -28,9 +28,11 @@ NODE_APP_INSTANCE=6 NODE_ENV=test node dist/server --benchmark-startup | |||
28 | 28 | ||
29 | ## @peertube/embed-api | 29 | ## @peertube/embed-api |
30 | 30 | ||
31 | At the root of PeerTube: | ||
32 | |||
31 | ``` | 33 | ``` |
32 | cd client/src/standalone/player | 34 | cd client/src/standalone/embed-player-api |
33 | npm version patch | 35 | npm version patch |
34 | npm run build | 36 | cd ../../../../ |
35 | npm publish --access=public | 37 | npm run release-embed-api |
36 | ``` | 38 | ``` |
diff --git a/support/doc/development/tests.md b/support/doc/development/tests.md index e3a65c35f..1c2589c8a 100644 --- a/support/doc/development/tests.md +++ b/support/doc/development/tests.md | |||
@@ -71,6 +71,7 @@ Some env variables can be defined to disable/enable some tests: | |||
71 | * `ENABLE_OBJECT_STORAGE_TESTS=true`: enable object storage tests (needs `chocobozzz/s3-ninja` container first) | 71 | * `ENABLE_OBJECT_STORAGE_TESTS=true`: enable object storage tests (needs `chocobozzz/s3-ninja` container first) |
72 | * `AKISMET_KEY`: specify an Akismet key to test akismet external PeerTube plugin | 72 | * `AKISMET_KEY`: specify an Akismet key to test akismet external PeerTube plugin |
73 | * `OBJECT_STORAGE_SCALEWAY_KEY_ID` and `OBJECT_STORAGE_SCALEWAY_ACCESS_KEY`: specify Scaleway API keys to test object storage ACL (not supported by our `chocobozzz/s3-ninja` container) | 73 | * `OBJECT_STORAGE_SCALEWAY_KEY_ID` and `OBJECT_STORAGE_SCALEWAY_ACCESS_KEY`: specify Scaleway API keys to test object storage ACL (not supported by our `chocobozzz/s3-ninja` container) |
74 | * `ENABLE_FFMPEG_THUMBNAIL_PIXEL_COMPARISON_TESTS=true`: enable pixel comparison on images generated by ffmpeg. Disabled by default because a custom ffmpeg version may fails the tests | ||
74 | 75 | ||
75 | 76 | ||
76 | ### Debug server logs | 77 | ### Debug server logs |
diff --git a/support/doc/tools.md b/support/doc/tools.md index 39f5ab787..2b3ebf159 100644 --- a/support/doc/tools.md +++ b/support/doc/tools.md | |||
@@ -227,7 +227,7 @@ docker-compose exec -u peertube peertube npm run regenerate-thumbnails | |||
227 | 227 | ||
228 | ### create-import-video-file-job.js | 228 | ### create-import-video-file-job.js |
229 | 229 | ||
230 | You can use this script to import a video file to replace an already uploaded file or to add a new webtorrent resolution to a video. PeerTube needs to be running. | 230 | You can use this script to import a video file to replace an already uploaded file or to add a new web compatible resolution to a video. PeerTube needs to be running. |
231 | You can then create a transcoding job using the web interface if you need to optimize your file or create an HLS version of it. | 231 | You can then create a transcoding job using the web interface if you need to optimize your file or create an HLS version of it. |
232 | 232 | ||
233 | ```bash | 233 | ```bash |
@@ -268,6 +268,35 @@ cd /var/www/peertube-docker | |||
268 | docker-compose exec -u peertube peertube npm run create-move-video-storage-job -- --to-object-storage --all-videos | 268 | docker-compose exec -u peertube peertube npm run create-move-video-storage-job -- --to-object-storage --all-videos |
269 | ``` | 269 | ``` |
270 | 270 | ||
271 | <!-- TODO: uncomment when PeerTube 6 is released | ||
272 | ### create-generate-storyboard-job | ||
273 | |||
274 | **PeerTube >= 6.0** | ||
275 | |||
276 | Use this script to generate storyboard of a specific video: | ||
277 | |||
278 | ```bash | ||
279 | # Basic installation | ||
280 | cd /var/www/peertube/peertube-latest | ||
281 | sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-generate-storyboard-job -- -v [videoUUID] | ||
282 | |||
283 | # Docker installation | ||
284 | cd /var/www/peertube-docker | ||
285 | docker-compose exec -u peertube peertube npm run create-generate-storyboard-job -- -v [videoUUID] | ||
286 | ``` | ||
287 | |||
288 | The script can also generate all missing storyboards of local videos: | ||
289 | |||
290 | ```bash | ||
291 | # Basic installation | ||
292 | cd /var/www/peertube/peertube-latest | ||
293 | sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-generate-storyboard-job -- --all-videos | ||
294 | |||
295 | # Docker installation | ||
296 | cd /var/www/peertube-docker | ||
297 | docker-compose exec -u peertube peertube npm run create-generate-storyboard-job -- --all-videos | ||
298 | ``` | ||
299 | --> | ||
271 | 300 | ||
272 | ### prune-storage.js | 301 | ### prune-storage.js |
273 | 302 | ||
@@ -357,6 +386,15 @@ PeerTube >= 5.2 supports VOD or Live transcoding by a remote PeerTube runner. | |||
357 | 386 | ||
358 | ### Installation | 387 | ### Installation |
359 | 388 | ||
389 | Ensure you have `ffmpeg` and `ffprobe` installed on your system: | ||
390 | |||
391 | ```bash | ||
392 | ffprobe -version # Should be >= 4.3 | ||
393 | ffmpeg -version # Should be >= 4.3 | ||
394 | ``` | ||
395 | |||
396 | Then install the CLI: | ||
397 | |||
360 | ```bash | 398 | ```bash |
361 | sudo npm install -g @peertube/peertube-runner | 399 | sudo npm install -g @peertube/peertube-runner |
362 | ``` | 400 | ``` |
@@ -385,7 +423,7 @@ peertube-runner server | |||
385 | 423 | ||
386 | ### Register | 424 | ### Register |
387 | 425 | ||
388 | Then, you can register the runner on a new PeerTube instance so the runner can process its transcoding job: | 426 | Then, you can register the runner to process transcoding job of a remote PeerTube instance: |
389 | 427 | ||
390 | ```bash | 428 | ```bash |
391 | peertube-runner register --url http://peertube.example.com --registration-token ptrrt-... --runner-name my-runner-name | 429 | peertube-runner register --url http://peertube.example.com --registration-token ptrrt-... --runner-name my-runner-name |
diff --git a/support/docker/production/config/custom-environment-variables.yaml b/support/docker/production/config/custom-environment-variables.yaml index 8fff54229..0058cbd64 100644 --- a/support/docker/production/config/custom-environment-variables.yaml +++ b/support/docker/production/config/custom-environment-variables.yaml | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # This file will be read by node-config | 2 | # This file will be read by node-config |
3 | # See https://github.com/node-config/node-config/wiki/Environment-Variables#custom-environment-variables | 3 | # See https://github.com/node-config/node-config/wiki/Environment-Variables#custom-environment-variables |
4 | # | 4 | # |
5 | 5 | ||
6 | webserver: | 6 | webserver: |
7 | hostname: "PEERTUBE_WEBSERVER_HOSTNAME" | 7 | hostname: "PEERTUBE_WEBSERVER_HOSTNAME" |
@@ -86,10 +86,10 @@ object_storage: | |||
86 | base_url: "PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_BASE_URL" | 86 | base_url: "PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_BASE_URL" |
87 | upload_acl: "PEERTUBE_OBJECT_STORAGE_UPLOAD_ACL" | 87 | upload_acl: "PEERTUBE_OBJECT_STORAGE_UPLOAD_ACL" |
88 | 88 | ||
89 | videos: | 89 | web_videos: |
90 | bucket_name: "PEERTUBE_OBJECT_STORAGE_VIDEOS_BUCKET_NAME" | 90 | bucket_name: "PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_BUCKET_NAME" |
91 | prefix: "PEERTUBE_OBJECT_STORAGE_VIDEOS_PREFIX" | 91 | prefix: "PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_PREFIX" |
92 | base_url: "PEERTUBE_OBJECT_STORAGE_VIDEOS_BASE_URL" | 92 | base_url: "PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_BASE_URL" |
93 | 93 | ||
94 | webadmin: | 94 | webadmin: |
95 | configuration: | 95 | configuration: |
@@ -177,9 +177,9 @@ transcoding: | |||
177 | 2160p: | 177 | 2160p: |
178 | __name: "PEERTUBE_TRANSCODING_2160P" | 178 | __name: "PEERTUBE_TRANSCODING_2160P" |
179 | __format: "json" | 179 | __format: "json" |
180 | webtorrent: | 180 | web_videos: |
181 | enabled: | 181 | enabled: |
182 | __name: "PEERTUBE_TRANSCODING_WEBTORRENT_ENABLED" | 182 | __name: "PEERTUBE_TRANSCODING_WEB_VIDEOS_ENABLED" |
183 | __format: "json" | 183 | __format: "json" |
184 | hls: | 184 | hls: |
185 | enabled: | 185 | enabled: |
diff --git a/support/docker/production/config/production.yaml b/support/docker/production/config/production.yaml index e3f6247d8..9c9581e40 100644 --- a/support/docker/production/config/production.yaml +++ b/support/docker/production/config/production.yaml | |||
@@ -47,7 +47,7 @@ storage: | |||
47 | tmp_persistent: '../data/tmp-persistent/' # As tmp but the directory is not cleaned up between PeerTube restarts | 47 | tmp_persistent: '../data/tmp-persistent/' # As tmp but the directory is not cleaned up between PeerTube restarts |
48 | bin: '../data/bin/' | 48 | bin: '../data/bin/' |
49 | avatars: '../data/avatars/' | 49 | avatars: '../data/avatars/' |
50 | videos: '../data/videos/' | 50 | web_videos: '../data/web-videos/' |
51 | streaming_playlists: '../data/streaming-playlists' | 51 | streaming_playlists: '../data/streaming-playlists' |
52 | redundancy: '../data/redundancy/' | 52 | redundancy: '../data/redundancy/' |
53 | logs: '../data/logs/' | 53 | logs: '../data/logs/' |
diff --git a/support/nginx/peertube b/support/nginx/peertube index 05a59c072..822f6f9ac 100644 --- a/support/nginx/peertube +++ b/support/nginx/peertube | |||
@@ -199,29 +199,7 @@ server { | |||
199 | alias /var/www/peertube/peertube-latest/client/dist/$1; | 199 | alias /var/www/peertube/peertube-latest/client/dist/$1; |
200 | } | 200 | } |
201 | 201 | ||
202 | # Bypass PeerTube for performance reasons. Optional. | 202 | location ~ ^(/static/(webseed|web-videos|streaming-playlists)/private/)|^/download { |
203 | location ~ ^/static/(thumbnails|avatars)/ { | ||
204 | if ($request_method = 'OPTIONS') { | ||
205 | add_header Access-Control-Allow-Origin '*'; | ||
206 | add_header Access-Control-Allow-Methods 'GET, OPTIONS'; | ||
207 | add_header Access-Control-Allow-Headers 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; | ||
208 | add_header Access-Control-Max-Age 1728000; # Preflight request can be cached 20 days | ||
209 | add_header Content-Type 'text/plain charset=UTF-8'; | ||
210 | add_header Content-Length 0; | ||
211 | return 204; | ||
212 | } | ||
213 | |||
214 | add_header Access-Control-Allow-Origin '*'; | ||
215 | add_header Access-Control-Allow-Methods 'GET, OPTIONS'; | ||
216 | add_header Access-Control-Allow-Headers 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; | ||
217 | add_header Cache-Control "public, max-age=7200"; # Cache response 2 hours | ||
218 | |||
219 | rewrite ^/static/(.*)$ /$1 break; | ||
220 | |||
221 | try_files $uri @api; | ||
222 | } | ||
223 | |||
224 | location ~ ^(/static/(webseed|streaming-playlists)/private/)|^/download { | ||
225 | # We can't rate limit a try_files directive, so we need to duplicate @api | 203 | # We can't rate limit a try_files directive, so we need to duplicate @api |
226 | 204 | ||
227 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 205 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
@@ -234,16 +212,10 @@ server { | |||
234 | } | 212 | } |
235 | 213 | ||
236 | # Bypass PeerTube for performance reasons. Optional. | 214 | # Bypass PeerTube for performance reasons. Optional. |
237 | location ~ ^/static/(webseed|redundancy|streaming-playlists)/ { | 215 | location ~ ^/static/(webseed|web-videos|redundancy|streaming-playlists)/ { |
238 | limit_rate_after 5M; | 216 | limit_rate_after 5M; |
239 | 217 | ||
240 | # Clients usually have 4 simultaneous webseed connections, so the real limit is 3MB/s per client | 218 | set $peertube_limit_rate 5M; |
241 | set $peertube_limit_rate 800k; | ||
242 | |||
243 | # Increase rate limit in HLS mode, because we don't have multiple simultaneous connections | ||
244 | if ($request_uri ~ -fragmented.mp4$) { | ||
245 | set $peertube_limit_rate 5M; | ||
246 | } | ||
247 | 219 | ||
248 | # Use this line with nginx >= 1.17.0 | 220 | # Use this line with nginx >= 1.17.0 |
249 | limit_rate $peertube_limit_rate; | 221 | limit_rate $peertube_limit_rate; |