W3C Member Submission

Volkswagen Infotainment Web Interface service definition: viwi.service.media

W3C Member Submission

This version:
https://www.w3.org/submissions/2016/SUBM-viwi-service-media-20161213/
Latest published version:
https://www.w3.org/submissions/viwi-service-media/
Editor:
Dr. Patrick Bartsch, Volkswagen AG

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications can be found in the W3C technical reports index at https://www.w3.org/TR/.

This is required.

By publishing this document, W3C acknowledges that the Submitting Members have made a formal Submission request to W3C for discussion. Publication of this document by W3C indicates no endorsement of its content by W3C, nor that W3C has, is, or will be allocating any resources to the issues addressed by it. This document is not the product of a chartered W3C group, but is published as potential input to the W3C Process. A W3C Team Comment has been published in conjunction with this Member Submission. Publication of acknowledged Member Submissions at the W3C site is one of the benefits of W3C Membership. Please consult the requirements associated with Member Submissions of section 3.3 of the W3C Patent Policy. Please consult the complete list of acknowledged W3C Member Submissions.

Volkswagen Infotainment Web Interface

service definition: viwi.service.media

 

viwi

by Dr. Patrick Bartsch 2013-2016

 

version: v1.5.3-W3C

 

This repo holds all media related resources

Table of contents

General information

version: 1.5.3-W3C

Repository:

Author

Dr. Patrick Bartsch <patrick.bartsch@volkswagen.de>

Resources

/media/collections/

The media collections can also be understood as media queues of the renderer. Media collections can only contain playable media like tracks, videos or pictures.

mediaCollectionObject

Properties

name description type format unit(s) value(s)
id collection id string uuid -
name collection name string -
uri object uri string uri -
items media collection items array /media/items/itemObject

Resource level access (/media/collections/)

POST

Note: Use a http POST request on /media/collections/ to create a new element of type mediaCollectionObject

Subscribe to /media/collections/ to receive updates for element creations or removals from the collection.

Request parameters

The following parameters can be used with the request and subscriptions:

name type format mandatory
name string no
items array yes
Request/response example
POST /media/collections/ HTTP/1.1
Host: 127.0.0.1:9000
Connection: keep-alive
Accept: application/json
User-Agent: Chrome/34.0.1847.137 Safari/537.36
Accept-Encoding: gzip,deflate
Accept-Language: en-US,en;q=0.8,de;q=0.6


{
  "viwi": "rockz.."
}

=>

HTTP/1.1 201 Created
Vary: Accept-Encoding
Content-Type: application/json; charset=utf-8
ETag: "-32550834"
Content-Encoding: gzip
Date: Tue, 07 Apr 1980 00:00:00 GMT
Connection: keep-alive
Transfer-Encoding: chunked
Location: /media/collections/3901a278-ba17-44d6-9aef-f7ca67c04840


{
  "status": "ok"
}

GET

Note: Use a http GET request on /media/collections/ to retrieve a list of available elements of type mediaCollectionObject

Subscribe to /media/collections/ to receive updates for element creations or removals from the collection.

Request/response example
GET /media/collections/ HTTP/1.1
Host: 127.0.0.1:9000
Connection: keep-alive
Accept: application/json
User-Agent: Chrome/34.0.1847.137 Safari/537.36
Accept-Encoding: gzip,deflate
Accept-Language: en-US,en;q=0.8,de;q=0.6

=>

HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json; charset=utf-8
ETag: "-32550834"
Content-Encoding: gzip
Date: Tue, 07 Apr 1980 00:00:00 GMT
Connection: keep-alive
Transfer-Encoding: chunked


{
  "status": "ok",
  "data": [
    {
      "id": "3901a278-ba17-44d6-9aef-f7ca67c04840",
      "name": "lorem ipsum",
      "uri": "/media/collections/3901a278-ba17-44d6-9aef-f7ca67c04840"
    },
    {
      "id": "8901870-b526-11e3-a5e2-0800200c9a66",
      "name": "dolor sit",
      "uri": "/media/collections/8901870-b526-11e3-a5e2-0800200c9a66"
    }
  ]
}

Element level access (/media/collections/:uuid)

POST

Note:

Use a http POST request on /media/collections/:uuid to update a particular mediaCollectionObject

Subscribe to /media/collections/:uuid to receive updates on element level changes.

Request parameters

The following parameters can be used with the request and subscriptions:

name type mandatory
name string no
items array no
Request/response example
POST /media/collections/3901a278-ba17-44d6-9aef-f7ca67c04840 HTTP/1.1
Host: 127.0.0.1:9000
Connection: keep-alive
Accept: application/json
User-Agent: Chrome/34.0.1847.137 Safari/537.36
Accept-Encoding: gzip,deflate
Accept-Language: en-US,en;q=0.8,de;q=0.6


{
  "viwi": "rockz.."
}
HTTP/1.1 201 Created
Vary: Accept-Encoding
Content-Type: application/json; charset=utf-8
ETag: "-32550834"
Content-Encoding: gzip
Date: Tue, 07 Apr 1980 00:00:00 GMT
Connection: keep-alive
Transfer-Encoding: chunked


{
  "status": "ok"
}

GET

Note:

Use a http GET request on /media/collections/:uuid to retrieve a particular mediaCollectionObject

Subscribe to /media/collections/:uuid to receive updates on element level changes.

Request/response example
GET /media/collections/3901a278-ba17-44d6-9aef-f7ca67c04840 HTTP/1.1
Host: 127.0.0.1:9000
Connection: keep-alive
Accept: application/json
User-Agent: Chrome/34.0.1847.137 Safari/537.36
Accept-Encoding: gzip,deflate
Accept-Language: en-US,en;q=0.8,de;q=0.6
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json; charset=utf-8
ETag: "-32550834"
Content-Encoding: gzip
Date: Tue, 07 Apr 1980 00:00:00 GMT
Connection: keep-alive
Transfer-Encoding: chunked


{
  "status": "ok",
  "data": [
    {
      "id": "3901a278-ba17-44d6-9aef-f7ca67c04840",
      "name": "lorem ipsum",
      "uri": "/media/collections/3901a278-ba17-44d6-9aef-f7ca67c04840"
    }
  ]
}

DELETE

Note:

Use a http DELETE request on /media/collections/:uuid to update a particular mediaCollectionObject

Subscribe to /media/collections/:uuid to receive updates on element level changes.

Request/response example
DELETE /media/collections/3901a278-ba17-44d6-9aef-f7ca67c04840 HTTP/1.1
Host: 127.0.0.1:9000
Connection: keep-alive
Accept: application/json
User-Agent: Chrome/34.0.1847.137 Safari/537.36
Accept-Encoding: gzip,deflate
Accept-Language: en-US,en;q=0.8,de;q=0.6
HTTP/1.1 201 Created
Vary: Accept-Encoding
Content-Type: application/json; charset=utf-8
ETag: "-32550834"
Content-Encoding: gzip
Date: Tue, 07 Apr 1980 00:00:00 GMT
Connection: keep-alive
Transfer-Encoding: chunked


{
  "status": "ok"
}

Events

The following events may be fired by client interaction or system side:

/media/renderers/

The media player renderer can be understood as the actual media player. It accepts media objects and applies actions like play, pause etc. to them.

rendererObject

Properties

name description type format unit(s) value(s)
id renderer id string uuid -
name renderer name string -
uri object uri string uri -
media current media collection object /media/collections/mediaCollectionObject
currentMediaItem the media item currently being renderered. object /media/items/itemObject
scan shuffle mode string off
up
down
offset current offset integer ms [-inf..inf]
state media renderers playback state string idle
play
pause
stop
ff
fr
repeat repeat mode string off
repeatall
repeatone
shuffle shuffle mode string on
off
type type of medium string track
video
image

Resource level access (/media/renderers/)

GET

Note: Use a http GET request on /media/renderers/ to retrieve a list of available elements of type rendererObject

Subscribe to /media/renderers/ to receive updates for element creations or removals from the collection.

Request/response example
GET /media/renderers/ HTTP/1.1
Host: 127.0.0.1:9000
Connection: keep-alive
Accept: application/json
User-Agent: Chrome/34.0.1847.137 Safari/537.36
Accept-Encoding: gzip,deflate
Accept-Language: en-US,en;q=0.8,de;q=0.6

=>

HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json; charset=utf-8
ETag: "-32550834"
Content-Encoding: gzip
Date: Tue, 07 Apr 1980 00:00:00 GMT
Connection: keep-alive
Transfer-Encoding: chunked


{
  "status": "ok",
  "data": [
    {
      "id": "3901a278-ba17-44d6-9aef-f7ca67c04840",
      "name": "lorem ipsum",
      "uri": "/media/renderers/3901a278-ba17-44d6-9aef-f7ca67c04840"
    },
    {
      "id": "8901870-b526-11e3-a5e2-0800200c9a66",
      "name": "dolor sit",
      "uri": "/media/renderers/8901870-b526-11e3-a5e2-0800200c9a66"
    }
  ]
}

Element level access (/media/renderers/:uuid)

POST

Note:

Use a http POST request on /media/renderers/:uuid to update a particular rendererObject

Subscribe to /media/renderers/:uuid to receive updates on element level changes.

Request parameters

The following parameters can be used with the request and subscriptions:

name type mandatory
media string no
currentMediaItem string no
offset integer no
state string no
repeat string no
shuffle string no
scan string no
Request/response example
POST /media/renderers/3901a278-ba17-44d6-9aef-f7ca67c04840 HTTP/1.1
Host: 127.0.0.1:9000
Connection: keep-alive
Accept: application/json
User-Agent: Chrome/34.0.1847.137 Safari/537.36
Accept-Encoding: gzip,deflate
Accept-Language: en-US,en;q=0.8,de;q=0.6


{
  "viwi": "rockz.."
}
HTTP/1.1 201 Created
Vary: Accept-Encoding
Content-Type: application/json; charset=utf-8
ETag: "-32550834"
Content-Encoding: gzip
Date: Tue, 07 Apr 1980 00:00:00 GMT
Connection: keep-alive
Transfer-Encoding: chunked


{
  "status": "ok"
}

GET

Note:

Use a http GET request on /media/renderers/:uuid to retrieve a particular rendererObject

Subscribe to /media/renderers/:uuid to receive updates on element level changes.

Request/response example
GET /media/renderers/3901a278-ba17-44d6-9aef-f7ca67c04840 HTTP/1.1
Host: 127.0.0.1:9000
Connection: keep-alive
Accept: application/json
User-Agent: Chrome/34.0.1847.137 Safari/537.36
Accept-Encoding: gzip,deflate
Accept-Language: en-US,en;q=0.8,de;q=0.6
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json; charset=utf-8
ETag: "-32550834"
Content-Encoding: gzip
Date: Tue, 07 Apr 1980 00:00:00 GMT
Connection: keep-alive
Transfer-Encoding: chunked


{
  "status": "ok",
  "data": [
    {
      "id": "3901a278-ba17-44d6-9aef-f7ca67c04840",
      "name": "lorem ipsum",
      "uri": "/media/renderers/3901a278-ba17-44d6-9aef-f7ca67c04840"
    }
  ]
}

Events

The following events may be fired by client interaction or system side:

/media/items/

Items are an indirection to allow adding multiple simliar media items to collections. The indirection allows deletion addition from/ro collections on a per item basis. The order of items within a collection is expressed through the collections endpoint.

itemObject

Properties

name description type format unit(s) value(s)
id identifier string uuid -
name shown name string -
uri object uri string uri -
collection the collection the element is associated with object /media/collections/collectionObject
renderable the referenced renderable item object /medialibrary/videos/videoObject

Resource level access (/media/items/)

GET

Note: Use a http GET request on /media/items/ to retrieve a list of available elements of type itemObject

Subscribe to /media/items/ to receive updates for element creations or removals from the collection.

Request/response example
GET /media/items/ HTTP/1.1
Host: 127.0.0.1:9000
Connection: keep-alive
Accept: application/json
User-Agent: Chrome/34.0.1847.137 Safari/537.36
Accept-Encoding: gzip,deflate
Accept-Language: en-US,en;q=0.8,de;q=0.6

=>

HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json; charset=utf-8
ETag: "-32550834"
Content-Encoding: gzip
Date: Tue, 07 Apr 1980 00:00:00 GMT
Connection: keep-alive
Transfer-Encoding: chunked


{
  "status": "ok",
  "data": [
    {
      "id": "3901a278-ba17-44d6-9aef-f7ca67c04840",
      "name": "lorem ipsum",
      "uri": "/media/items/3901a278-ba17-44d6-9aef-f7ca67c04840"
    },
    {
      "id": "8901870-b526-11e3-a5e2-0800200c9a66",
      "name": "dolor sit",
      "uri": "/media/items/8901870-b526-11e3-a5e2-0800200c9a66"
    }
  ]
}

POST

Note: Use a http POST request on /media/items/ to create a new element of type itemObject

Subscribe to /media/items/ to receive updates for element creations or removals from the collection.

Request parameters

The following parameters can be used with the request and subscriptions:

name type format mandatory
collection string uri yes
renderable string uri yes
Request/response example
POST /media/items/ HTTP/1.1
Host: 127.0.0.1:9000
Connection: keep-alive
Accept: application/json
User-Agent: Chrome/34.0.1847.137 Safari/537.36
Accept-Encoding: gzip,deflate
Accept-Language: en-US,en;q=0.8,de;q=0.6


{
  "viwi": "rockz.."
}

=>

HTTP/1.1 201 Created
Vary: Accept-Encoding
Content-Type: application/json; charset=utf-8
ETag: "-32550834"
Content-Encoding: gzip
Date: Tue, 07 Apr 1980 00:00:00 GMT
Connection: keep-alive
Transfer-Encoding: chunked
Location: /media/items/3901a278-ba17-44d6-9aef-f7ca67c04840


{
  "status": "ok"
}

Element level access (/media/items/:uuid)

GET

Note:

Use a http GET request on /media/items/:uuid to retrieve a particular itemObject

Subscribe to /media/items/:uuid to receive updates on element level changes.

Request/response example
GET /media/items/3901a278-ba17-44d6-9aef-f7ca67c04840 HTTP/1.1
Host: 127.0.0.1:9000
Connection: keep-alive
Accept: application/json
User-Agent: Chrome/34.0.1847.137 Safari/537.36
Accept-Encoding: gzip,deflate
Accept-Language: en-US,en;q=0.8,de;q=0.6
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json; charset=utf-8
ETag: "-32550834"
Content-Encoding: gzip
Date: Tue, 07 Apr 1980 00:00:00 GMT
Connection: keep-alive
Transfer-Encoding: chunked


{
  "status": "ok",
  "data": [
    {
      "id": "3901a278-ba17-44d6-9aef-f7ca67c04840",
      "name": "lorem ipsum",
      "uri": "/media/items/3901a278-ba17-44d6-9aef-f7ca67c04840"
    }
  ]
}

POST

Note:

Use a http POST request on /media/items/:uuid to update a particular itemObject

Subscribe to /media/items/:uuid to receive updates on element level changes.

Request parameters

The following parameters can be used with the request and subscriptions:

name type mandatory
renderable string no
collection string no
Request/response example
POST /media/items/3901a278-ba17-44d6-9aef-f7ca67c04840 HTTP/1.1
Host: 127.0.0.1:9000
Connection: keep-alive
Accept: application/json
User-Agent: Chrome/34.0.1847.137 Safari/537.36
Accept-Encoding: gzip,deflate
Accept-Language: en-US,en;q=0.8,de;q=0.6


{
  "viwi": "rockz.."
}
HTTP/1.1 201 Created
Vary: Accept-Encoding
Content-Type: application/json; charset=utf-8
ETag: "-32550834"
Content-Encoding: gzip
Date: Tue, 07 Apr 1980 00:00:00 GMT
Connection: keep-alive
Transfer-Encoding: chunked


{
  "status": "ok"
}

Events

The following events may be fired by client interaction or system side: