Open Chocobozzz opened 5 years ago
Does this mean Nextcloud would need to support webtorrent as well, since it is an underlying technology of Peertube?
@sunjam No, because of The UI renders an embed with oembed nextcloud would just have to create an iframe of a PeerTube player that will handle P2P stuffs.
hey @Chocobozzz
Could you paste such a message containing a video AS objects?
I need to understand how these are attached to toots (eg: are they regular attachments like images?)
thanks
@StCyr Mastodon doesn't store the video object. I think they just store the id
(so they can redirect AP requests to the origin object), and a status DB object that contains the video name and the video URL. Then the Mastodon client renders the status with oembed (because the status contains a URL).
{
"type": "Video",
"id": "https://peertube.cpy.re/videos/watch/da2b08d4-a242-4170-b32a-4ec8cbdca701",
"name": "PeerTube demo with Mastodon",
"duration": "PT80S",
"uuid": "da2b08d4-a242-4170-b32a-4ec8cbdca701",
"tag": [
{
"type": "Hashtag",
"name": "activitypub"
},
{
"type": "Hashtag",
"name": "mastodon"
}
],
"category": {
"identifier": "15",
"name": "Science & Technology"
},
"licence": {
"identifier": "7",
"name": "Public Domain Dedication"
},
"views": 10684,
"sensitive": false,
"waitTranscoding": false,
"state": 1,
"commentsEnabled": false,
"downloadEnabled": true,
"published": "2018-01-05T14:07:54.967Z",
"originallyPublishedAt": null,
"updated": "2019-08-01T14:01:00.360Z",
"mediaType": "text/markdown",
"content": null,
"support": null,
"subtitleLanguage": [],
"icon": {
"type": "Image",
"url": "https://peertube.cpy.re/static/thumbnails/da2b08d4-a242-4170-b32a-4ec8cbdca701.jpg",
"mediaType": "image/jpeg",
"width": 200,
"height": 110
},
"url": [
{
"type": "Link",
"mimeType": "video/mp4",
"mediaType": "video/mp4",
"href": "https://peertube.cpy.re/static/webseed/da2b08d4-a242-4170-b32a-4ec8cbdca701-360.mp4",
"height": 360,
"size": 463034,
"fps": -1
},
{
"type": "Link",
"mimeType": "application/x-bittorrent",
"mediaType": "application/x-bittorrent",
"href": "https://peertube.cpy.re/static/torrents/da2b08d4-a242-4170-b32a-4ec8cbdca701-360.torrent",
"height": 360
},
{
"type": "Link",
"mimeType": "application/x-bittorrent;x-scheme-handler/magnet",
"mediaType": "application/x-bittorrent;x-scheme-handler/magnet",
"href": "magnet:?xs=https%3A%2F%2Fpeertube.cpy.re%2Fstatic%2Ftorrents%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-360.torrent&xt=urn:btih:69172d0033bcc9c2baaa6b835a29a8e8dc80fe44&dn=PeerTube+demo+with+Mastodon&tr=wss%3A%2F%2Fpeertube.cpy.re%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fpeertube.cpy.re%2Ftracker%2Fannounce&ws=https%3A%2F%2Fpeertube.cpy.re%2Fstatic%2Fwebseed%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-360.mp4&ws=https%3A%2F%2Fpeertube.social%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-360.mp4&ws=https%3A%2F%2Fwatching.cypherpunk.observer%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-360.mp4&ws=https%3A%2F%2Fvideo.omniatv.com%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-360.mp4&ws=https%3A%2F%2Fpeertube.live%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-360.mp4&ws=https%3A%2F%2Fpeertube2.cpy.re%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-360.mp4",
"height": 360
},
{
"type": "Link",
"mimeType": "video/mp4",
"mediaType": "video/mp4",
"href": "https://peertube.cpy.re/static/webseed/da2b08d4-a242-4170-b32a-4ec8cbdca701-480.mp4",
"height": 480,
"size": 687599,
"fps": -1
},
{
"type": "Link",
"mimeType": "application/x-bittorrent",
"mediaType": "application/x-bittorrent",
"href": "https://peertube.cpy.re/static/torrents/da2b08d4-a242-4170-b32a-4ec8cbdca701-480.torrent",
"height": 480
},
{
"type": "Link",
"mimeType": "application/x-bittorrent;x-scheme-handler/magnet",
"mediaType": "application/x-bittorrent;x-scheme-handler/magnet",
"href": "magnet:?xs=https%3A%2F%2Fpeertube.cpy.re%2Fstatic%2Ftorrents%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-480.torrent&xt=urn:btih:ecc7bc505c24844b8159180689ec02d21b7bedd6&dn=PeerTube+demo+with+Mastodon&tr=wss%3A%2F%2Fpeertube.cpy.re%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fpeertube.cpy.re%2Ftracker%2Fannounce&ws=https%3A%2F%2Fpeertube.cpy.re%2Fstatic%2Fwebseed%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-480.mp4&ws=https%3A%2F%2Fpeertube.live%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-480.mp4&ws=https%3A%2F%2Fpeertube2.cpy.re%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-480.mp4&ws=https%3A%2F%2Fwatching.cypherpunk.observer%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-480.mp4&ws=https%3A%2F%2Fvideo.omniatv.com%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-480.mp4&ws=https%3A%2F%2Fpeertube.social%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-480.mp4",
"height": 480
},
{
"type": "Link",
"mimeType": "video/mp4",
"mediaType": "video/mp4",
"href": "https://peertube.cpy.re/static/webseed/da2b08d4-a242-4170-b32a-4ec8cbdca701-1044.mp4",
"height": 1044,
"size": 2304439,
"fps": -1
},
{
"type": "Link",
"mimeType": "application/x-bittorrent",
"mediaType": "application/x-bittorrent",
"href": "https://peertube.cpy.re/static/torrents/da2b08d4-a242-4170-b32a-4ec8cbdca701-1044.torrent",
"height": 1044
},
{
"type": "Link",
"mimeType": "application/x-bittorrent;x-scheme-handler/magnet",
"mediaType": "application/x-bittorrent;x-scheme-handler/magnet",
"href": "magnet:?xs=https%3A%2F%2Fpeertube.cpy.re%2Fstatic%2Ftorrents%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-1044.torrent&xt=urn:btih:bab24aa0a1cf3d44b4203d5f055468b919ec7400&dn=PeerTube+demo+with+Mastodon&tr=wss%3A%2F%2Fpeertube.cpy.re%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fpeertube.cpy.re%2Ftracker%2Fannounce&ws=https%3A%2F%2Fpeertube.cpy.re%2Fstatic%2Fwebseed%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-1044.mp4&ws=https%3A%2F%2Fpeertube.live%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-1044.mp4&ws=https%3A%2F%2Fpeertube2.cpy.re%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-1044.mp4&ws=https%3A%2F%2Fvideo.omniatv.com%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-1044.mp4&ws=https%3A%2F%2Fwatching.cypherpunk.observer%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-1044.mp4&ws=https%3A%2F%2Fpeertube.social%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-1044.mp4",
"height": 1044
},
{
"type": "Link",
"mimeType": "video/mp4",
"mediaType": "video/mp4",
"href": "https://peertube.cpy.re/static/webseed/da2b08d4-a242-4170-b32a-4ec8cbdca701-720.mp4",
"height": 720,
"size": 1291994,
"fps": -1
},
{
"type": "Link",
"mimeType": "application/x-bittorrent",
"mediaType": "application/x-bittorrent",
"href": "https://peertube.cpy.re/static/torrents/da2b08d4-a242-4170-b32a-4ec8cbdca701-720.torrent",
"height": 720
},
{
"type": "Link",
"mimeType": "application/x-bittorrent;x-scheme-handler/magnet",
"mediaType": "application/x-bittorrent;x-scheme-handler/magnet",
"href": "magnet:?xs=https%3A%2F%2Fpeertube.cpy.re%2Fstatic%2Ftorrents%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-720.torrent&xt=urn:btih:66e591f476cbef604d198b9f45cdc778d126a8f0&dn=PeerTube+demo+with+Mastodon&tr=wss%3A%2F%2Fpeertube.cpy.re%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fpeertube.cpy.re%2Ftracker%2Fannounce&ws=https%3A%2F%2Fpeertube.cpy.re%2Fstatic%2Fwebseed%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-720.mp4&ws=https%3A%2F%2Fpeertube2.cpy.re%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-720.mp4&ws=https%3A%2F%2Fpeertube.live%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-720.mp4&ws=https%3A%2F%2Fvideo.omniatv.com%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-720.mp4&ws=https%3A%2F%2Fwatching.cypherpunk.observer%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-720.mp4&ws=https%3A%2F%2Fpeertube.social%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-720.mp4",
"height": 720
},
{
"type": "Link",
"mimeType": "video/mp4",
"mediaType": "video/mp4",
"href": "https://peertube.cpy.re/static/webseed/da2b08d4-a242-4170-b32a-4ec8cbdca701-240.mp4",
"height": 240,
"size": 262579,
"fps": -1
},
{
"type": "Link",
"mimeType": "application/x-bittorrent",
"mediaType": "application/x-bittorrent",
"href": "https://peertube.cpy.re/static/torrents/da2b08d4-a242-4170-b32a-4ec8cbdca701-240.torrent",
"height": 240
},
{
"type": "Link",
"mimeType": "application/x-bittorrent;x-scheme-handler/magnet",
"mediaType": "application/x-bittorrent;x-scheme-handler/magnet",
"href": "magnet:?xs=https%3A%2F%2Fpeertube.cpy.re%2Fstatic%2Ftorrents%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-240.torrent&xt=urn:btih:9e67202f91446a240615ca680666cc57207b4596&dn=PeerTube+demo+with+Mastodon&tr=wss%3A%2F%2Fpeertube.cpy.re%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fpeertube.cpy.re%2Ftracker%2Fannounce&ws=https%3A%2F%2Fpeertube.cpy.re%2Fstatic%2Fwebseed%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-240.mp4&ws=https%3A%2F%2Fpeertube.live%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-240.mp4&ws=https%3A%2F%2Fpeertube2.cpy.re%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-240.mp4&ws=https%3A%2F%2Fwatching.cypherpunk.observer%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-240.mp4&ws=https%3A%2F%2Fvideo.omniatv.com%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-240.mp4&ws=https%3A%2F%2Fpeertube.social%2Fstatic%2Fredundancy%2Fda2b08d4-a242-4170-b32a-4ec8cbdca701-240.mp4",
"height": 240
},
{
"type": "Link",
"mimeType": "text/html",
"mediaType": "text/html",
"href": "https://peertube.cpy.re/videos/watch/da2b08d4-a242-4170-b32a-4ec8cbdca701"
}
],
"likes": "https://peertube.cpy.re/videos/watch/da2b08d4-a242-4170-b32a-4ec8cbdca701/likes",
"dislikes": "https://peertube.cpy.re/videos/watch/da2b08d4-a242-4170-b32a-4ec8cbdca701/dislikes",
"shares": "https://peertube.cpy.re/videos/watch/da2b08d4-a242-4170-b32a-4ec8cbdca701/announces",
"comments": "https://peertube.cpy.re/videos/watch/da2b08d4-a242-4170-b32a-4ec8cbdca701/comments",
"attributedTo": [
{
"type": "Person",
"id": "https://peertube.cpy.re/accounts/chocobozzz"
},
{
"type": "Group",
"id": "https://peertube.cpy.re/video-channels/1fccb6e4-863c-4538-a4db-770c464f06a1"
}
],
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [
"https://peertube.cpy.re/accounts/chocobozzz/followers"
],
"@context": [
...
]
}
Describe the solution you'd like
Support Video AS objects, so nextcloud would be compatible with federated video platforms (like PeerTube).
The way that Mastodon handles video objects seems fine and quite simple:
Video
objectNote
objects)This way, I would be able to follow my favorite video makers, and get/watch their video directly in my nextloud interface.