- From: James M Snell <jasnell@gmail.com>
- Date: Mon, 3 Nov 2014 19:35:11 -0800
- To: Owen Shepherd <owen.shepherd@e43.eu>
- Cc: ☮ elf Pavlik ☮ <perpetual-tripper@wwelves.org>, "public-socialweb@w3.org" <public-socialweb@w3.org>
This seems to be getting a bit lost in the weeds. Let's keep the issues separate. The first issue is: "rel" as currently defined in the spec doesn't work the way it should and ought to be removed. The second issue is in how the as:Link class is defined. Let me make sure there's no confusion on this point. as:Link is essentially a marker that indicates that the value of @id can be dereferenced. Yes, there are a handful of additional properties that MAY be used with it, but the marking function is the most important. When I say... { "@id": "http://example.org/foo", "@type": "as:Link" } What I'm saying is that doing a GET on "http://example.org/foo" returns something about that resource, which may not always be the case when working with an Activity Streams document (particularly one brought over from 1.0). So when I say something like: { "@id": "http://example.org/foo", "@type": ["as:Link", "urn:example:Image"], "mediaType": "image/jpeg" } Yes, it really is both a "as:Link" and a "urn:example:Image". On Mon, Nov 3, 2014 at 3:45 PM, Owen Shepherd <owen.shepherd@e43.eu> wrote: [snipp > > So, the reason I initially objected to complete unification of "Objects" and > "Media Links" from AS1, and the reason I continue to do so, is that they > continue to be semantically different objects in the social graph > Owen's argument on this is what convinced me to put as:Link back in and model it the way that I have. Take the following three cases: A. { "@type": "as:Link", "@id": "http://example.org/foo", "displayName": "A Link", "mediaType": "text/html" } B. { "@type": "urn:example:types:post", "@id": "urn:example:posts:123", "displayName": "A Post", "content": "A simple note" } C. { "@type": ["urn:example:types:post", "as:Link"], "@id": "http://example.org/foo", "displayName": "A Post", "content": "A simple note", "mediaType": "text/html" } A is just a Link. There is no other type information provided. The @id specifies a URL that can be dereferenced. The Link has a displayName and mediaType that identifies the MIME content type that can be expected when dereferencing. B is just an Object. In this case, the @id happens to not be dereferenceable. C is both a Link and an Object. The only real difference in this case is that @id happens to be dereferenceable. There is some overlap with Hydra in the way this is defined but my goal right now is not perfection... I'm taking incremental steps here. Some overlap is perfectly acceptable. > [snip] > This leaves two remaining questions: > > How do we handle multiple variants of a piece of media? (e.g. multiple > codecs and/or resolutions of a video). This probably requires another level > of indirection (sigh) > How do we support embedding "non-trivial" content/fallback. AS1 had > embedCode, do we bring back something like that? (Maybe a URI to embed as an > iframe?) > > How I envisage this working: > { > "@type": "as:Article", > "@id": "https://buzznews.example/2014/14/03/see-this-funny-video" > "title": "See this funny video!", > "author": { > "@type": "as:Person", > "@id": "https://johnsmith.example" > "displayName": "John Smith", > "icon": { > // "dumb" icon. as:Media implied by as:icon. > "src": "https://johmsnith.example.com/displaypic.jpg" > }, > ... > }, > // "Related" video - probably "headline" > "video": { > // Vivified object! > "@type": "as:Video", > "@id": "https://yourtube.example/as78678j", > "src": [ > // Proposed multiple source syntax. Derived from HTML5 <source> > parameters. > // We probably want to just do "resolution" or "res" for > widthxheight because srcset is a backcompat hack not applicable to us > {"href": "https://yourtube.example/as78678j .mp4", "type": > 'video/mp4; codecs="avc1.42E01E, mp4a.40.2" '}, > {"href": "https://yourtube.example/as78678j .mkv", "type": > 'video/webm; codecs="video/webm; codecs="vp8, vorbis" '}, > ], > "image": { "src": "https://yourtube.example/as78678j .jpeg " }, > ... // comments, etc > }, > // "Caption image" - maybe suppressed by the video, but e.g. a feed > reader might use this in an overview page > "splash": { // * (See end) > "src": "https://buzznewscdn.example/dasdljkah7893yiu.jpg" > }, > "content": /* article body */, > ... // comments etc > } > > People's thoughts? It does not need to be complicated: { "@type": ["urn:example:Video", "as:Link"], "@id": "https://yourtube.example/as78678j", "mediaType": "text/html", "title": "This is a funny video", "author": { "@id": "urn:example:person:sally", "displayName": "Sally", "image": { "@type": "as:Link", "@id": "http://example.org/img/sally.jpg", "displayName": "A picture of Sally", "mediaType": "image/jpeg" } }, "url": [ { "@type": "as:Link", "@id": "https://yourtube.example/as78678j.mpg", "mediaType": "video/mp4" }, { "@type": "as:Link", "@id": "https://yourtube.example/as78678j.mkv", "mediaType": "video/mkv" } ], "image": "https://yourtube.example/as78678j.jpeg" } When processed through, the normalized version becomes: <http://example.org/img/sally.jpg> <as:displayName> "A picture of Sally" . <http://example.org/img/sally.jpg> <as:mediaType> "image/jpeg" . <http://example.org/img/sally.jpg> <rdf:type> <as:Link> . <https://yourtube.example/as78678j.mkv> <as:mediaType> "video/mkv" . <https://yourtube.example/as78678j.mkv> <rdf:type> <as:Link> . <https://yourtube.example/as78678j.mpg> <as:mediaType> "video/mp4" . <https://yourtube.example/as78678j.mpg> <rdf:type> <as:Link> . <https://yourtube.example/as78678j> <as:author> <urn:example:person:sally> . <https://yourtube.example/as78678j> <as:image> <https://yourtube.example/as78678j.jpeg> . <https://yourtube.example/as78678j> <as:mediaType> "text/html" . <https://yourtube.example/as78678j> <as:title> "This is a funny video" . <https://yourtube.example/as78678j> <as:url> <https://yourtube.example/as78678j.mkv> . <https://yourtube.example/as78678j> <as:url> <https://yourtube.example/as78678j.mpg> . <https://yourtube.example/as78678j> <rdf:type> <as:Link> . <https://yourtube.example/as78678j> <rdf:type> <urn:example:Video> . <urn:example:person:sally> <as:displayName> "Sally" . <urn:example:person:sally> <as:image> <http://example.org/img/sally.jpg> . Which just works. - James > > * splash: I'm not sure what to call this or if its necessary, but the > intention is to imply an image which its' explicitly allowed to scale and, > more importantly, crop. Basically you should expect that this image is > "center cropped".
Received on Tuesday, 4 November 2014 03:35:59 UTC