eft: Update
This commit is contained in:
parent
b219c4bb7a
commit
03b759eafb
@ -14,39 +14,38 @@ This document specifies are more general and extensible element for specifiying
|
|||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<file-thumbnails xmlns="proto:urn:xmpp:eft:0">
|
<file-thumbnail type="proto:urn:xmpp:eft:0:blurhash" xmlns="proto:urn:xmpp:eft:0">
|
||||||
<blurhash xmlns="proto:urn:xmpp:eft:blurhash">LEHV6nWB2yk8pyoJadR*.7kCMdnj</blurhash>
|
<blurhash xmlns="proto:urn:xmpp:eft:0:blurhash">LEHV6nWB2yk8pyoJadR*.7kCMdnj</blurhash>
|
||||||
</file-thumbnails>
|
</file-thumbnail>
|
||||||
```
|
```
|
||||||
|
|
||||||
In this example, the thumbnail contains only a blurhash thumbnail, indicated by the `<blurhash/>` element, but an implementation
|
This example specifies a thumbnail of type `blurhash`, meaning that the child element of the
|
||||||
may add more versions of the same thumbnail, i.e. another `<base64-bob/>` element as a fallback if a client does not support
|
`<file-thumbnail/>` element must contain a `<blurhash/>` element (See "Thumbnail Types").
|
||||||
blurhash. To prevent confusion in the display of a thumbnail, all children of `<file-thumbnail />` must describe a thumbnail
|
|
||||||
for the same file.
|
|
||||||
|
|
||||||
### Thumbnail Types
|
### Thumbnail Types
|
||||||
#### Blurhash
|
#### Blurhash
|
||||||
|
|
||||||
If a sender includes a `<blurhash/>` inside the `<file-thumbnail/>` element, then it must be interpreted as
|
If a sender specifies the type of the `<file-thumbnail/>` element to be
|
||||||
[Blurhash](https://github.com/woltapp/blurhash) data. As a sender, care must be taken to not make the Blurhash
|
`proto:urn:xmpp:eft:0:blurhash`, then the `<blurhash/>` element's value must be interpreted
|
||||||
thumbnail too big as to not loose the advantages of blurhash.
|
as [Blurhash](https://github.com/woltapp/blurhash) data. As a sender, care must be taken to
|
||||||
|
not make the Blurhash thumbnail too big as to not loose the advantages of Blurhash.
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<file-thumbails xmlns="proto:urn:xmpp:eft:0">
|
<file-thumbail xmlns="proto:urn:xmpp:eft:0">
|
||||||
<blurhash xmlns="proto:urn:xmpp:eft:blurhash">LEHV6nWB2yk8pyoJadR*.7kCMdnj</blurhash>
|
<blurhash xmlns="proto:urn:xmpp:eft:0:blurhash">LEHV6nWB2yk8pyoJadR*.7kCMdnj</blurhash>
|
||||||
</file-thumbnails>
|
</file-thumbnail>
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Jingle Content Thumbnail Compatability
|
#### Jingle Content Thumbnail Compatability
|
||||||
|
|
||||||
In order to enable a pseudo-interoperability with [Jingle Content Thumbnails](https://xmpp.org/extensions/xep-0264.html), inclusion of a
|
In order to enable a pseudo-interoperability with [Jingle Content Thumbnails](https://xmpp.org/extensions/xep-0264.html), inclusion of a
|
||||||
`<thumbnail/>` element is allowed. This is to allow easy reuse of an already existent [Jingle Content Thumbnails](https://xmpp.org/extensions/xep-0264.html)
|
`<thumbnail/>` element is allowed. This is to allow easy reuse of an already existent [Jingle Content Thumbnails](https://xmpp.org/extensions/xep-0264.html)
|
||||||
implementation.
|
implementation. The type of the `<file-thumbnail/>` must then be set to `proto:urn:xmpp:eft:0:base64-bob`.
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<file-thumbails xmlns="proto:urn:xmpp:eft:0" type="base64-bob">
|
<file-thumbail xmlns="proto:urn:xmpp:eft:0" type="proto:urn:xmpp:eft:0:base64-bob">
|
||||||
<thumbnail xmlns="urn:xmpp:thumbs:1" uri="cid:sha1+...@bob.xmpp.org" media-type="image/png" width="128" height="96" />
|
<thumbnail xmlns="urn:xmpp:thumbs:1" uri="cid:sha1+...@bob.xmpp.org" media-type="image/png" width="128" height="96" />
|
||||||
</file-thumbnails>
|
</file-thumbnail>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage Example with Stateless Inline Media Sharing
|
## Usage Example with Stateless Inline Media Sharing
|
||||||
@ -55,34 +54,36 @@ NOTE: This example is taken from [Stateless Inline Media Sharing](https://xmpp.o
|
|||||||
|
|
||||||
```xml
|
```xml
|
||||||
<message to='julient@shakespeare.lit' from='romeo@montague.lit'>
|
<message to='julient@shakespeare.lit' from='romeo@montague.lit'>
|
||||||
<body>Look at the nice view from the summit.</body>
|
<body>Look at the nice view from the summit.</body>
|
||||||
<reference xmlns='urn:xmpp:reference:0' begin='17' end='20' type='data'>
|
<reference xmlns='urn:xmpp:reference:0' begin='17' end='20' type='data'>
|
||||||
<media-sharing xmlns='urn:xmpp:sims:1'>
|
<media-sharing xmlns='urn:xmpp:sims:1'>
|
||||||
<file xmlns='urn:xmpp:jingle:apps:file-transfer:5'>
|
<file xmlns='urn:xmpp:jingle:apps:file-transfer:5'>
|
||||||
<media-type>image/jpeg</media-type>
|
<media-type>image/jpeg</media-type>
|
||||||
<name>summit.jpg</name>
|
<name>summit.jpg</name>
|
||||||
<size>3032449</size>
|
<size>3032449</size>
|
||||||
<hash xmlns='urn:xmpp:hashes:2' algo='sha3-256'>2XarmwTlNxDAMkvymloX3S5+VbylNrJt/l5QyPa+YoU=</hash>
|
<hash xmlns='urn:xmpp:hashes:2' algo='sha3-256'>2XarmwTlNxDAMkvymloX3S5+VbylNrJt/l5QyPa+YoU=</hash>
|
||||||
<hash xmlns='urn:xmpp:hashes:2' algo='id-blake2b256'>2AfMGH8O7UNPTvUVAM9aK13mpCY=</hash>
|
<hash xmlns='urn:xmpp:hashes:2' algo='id-blake2b256'>2AfMGH8O7UNPTvUVAM9aK13mpCY=</hash>
|
||||||
<desc>Photo from the summit.</desc>
|
<desc>Photo from the summit.</desc>
|
||||||
<file-thumbnail type="base64-bob" xmlns='urn:xmpp:thumbnail:0'>
|
<file-thumbnail type="base64-bob" xmlns='urn:xmpp:thumbnail:0'>
|
||||||
<base64-bob uri="cid:sha1+ffd7c8d28e9c5e82afea41f97108c6b4@bob.xmpp.org" media-type="image/png" width="128" height="96" />
|
<base64-bob uri="cid:sha1+ffd7c8d28e9c5e82afea41f97108c6b4@bob.xmpp.org" media-type="image/png" width="128" height="96" />
|
||||||
</thumbnail>
|
</thumbnail>
|
||||||
<file-thumbnails xmlns="proto:urn:xmpp:eft:0">
|
<file-thumbnail type="proto:urn:xmpp:eft:0:blurhash" xmlns="proto:urn:xmpp:eft:0">
|
||||||
<blurhash xmlns="proto:urn:xmpp:eft:blurhash">LEHV6nWB2yk8pyoJadR*.7kCMdnj</blurhash>
|
<blurhash xmlns="proto:urn:xmpp:eft:blurhash">LEHV6nWB2yk8pyoJadR*.7kCMdnj</blurhash>
|
||||||
<thumbnail xmlns='urn:xmpp:thumbs:1'
|
</file-thumbnail>
|
||||||
uri='cid:sha1+ffd7c8d28e9c5e82afea41f97108c6b4@bob.xmpp.org'
|
<file-thumbnail type="proto:urn:xmpp:eft:0:base64-bob" xmlns="proto:urn:xmpp:eft:0">
|
||||||
media-type='image/png'
|
<thumbnail xmlns='urn:xmpp:thumbs:1'
|
||||||
width='128'
|
uri='cid:sha1+ffd7c8d28e9c5e82afea41f97108c6b4@bob.xmpp.org'
|
||||||
height='96'/>
|
media-type='image/png'
|
||||||
</file-thumbnails>
|
width='128'
|
||||||
</file>
|
height='96'/>
|
||||||
<sources>
|
</file-thumbnail>
|
||||||
<reference xmlns='urn:xmpp:reference:0' type='data' uri='https://download.montague.lit/4a771ac1-f0b2-4a4a-9700-f2a26fa2bb67/summit.jpg' />
|
</file>
|
||||||
<reference xmlns='urn:xmpp:reference:0' type='data' uri='xmpp:romeo@montague.lit/resource?jingle;id=9559976B-3FBF-4E7E-B457-2DAA225972BB' />
|
<sources>
|
||||||
</sources>
|
<reference xmlns='urn:xmpp:reference:0' type='data' uri='https://download.montague.lit/4a771ac1-f0b2-4a4a-9700-f2a26fa2bb67/summit.jpg' />
|
||||||
</media-sharing>
|
<reference xmlns='urn:xmpp:reference:0' type='data' uri='xmpp:romeo@montague.lit/resource?jingle;id=9559976B-3FBF-4E7E-B457-2DAA225972BB' />
|
||||||
</reference>
|
</sources>
|
||||||
|
</media-sharing>
|
||||||
|
</reference>
|
||||||
</message>
|
</message>
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -95,6 +96,11 @@ The same considerations apply as specified by [Jingle Content Thumbnails](https:
|
|||||||
- Change XML namespace from `proto:urn:xmpp:eft:0` to `urn:xmpp:eft:0` once we submit this as an XEP
|
- Change XML namespace from `proto:urn:xmpp:eft:0` to `urn:xmpp:eft:0` once we submit this as an XEP
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
### 0.2.0
|
||||||
|
|
||||||
|
- Namespace the thumbnail type
|
||||||
|
- `<file-thumbnails/>` to `<file-thumbnail/>`
|
||||||
|
|
||||||
### 0.1.0
|
### 0.1.0
|
||||||
|
|
||||||
- Remove the base64 thumbnail type
|
- Remove the base64 thumbnail type
|
||||||
@ -109,5 +115,5 @@ The same considerations apply as specified by [Jingle Content Thumbnails](https:
|
|||||||
| Key | Value |
|
| Key | Value |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| Author | PapaTutuWawa |
|
| Author | PapaTutuWawa |
|
||||||
| Version | 0.1.0 |
|
| Version | 0.2.0 |
|
||||||
| Short name | eft |
|
| Short name | eft |
|
||||||
|
Loading…
Reference in New Issue
Block a user