Home discovery alternatives
Home Network discovery
This document is an attempt to explore how Home Network services could be exposed to a web application using different approaches. For a detailed list of UCs that the Home Network TF has discussed take a look at the HNTF requirement document
For each option pro and cons are listed. None of the options at this stage are endorsed or recommended.
References
List of useful links:
Use case: browse and play
Browse content stored on your DVR and play it from your PC.
Steps:
- the user browse to "the ultimate home player" web page
- the page ask the user to pick some content to playback
- the user browse the content from the DVR in his home network
- the user select a video.
- the page playback the video stored on the DVR
Opt 1
Use the pick intent.
Registration
- The UA will discover HN services able to expose content on the home network and list them to the user when the intent is started. How discovery happens is implementation specific.
Invocation
var intent = new Intent("http://webintents.org/pick", "video/*"); window.navigator.startActivity(intent, function(intentData) { var selectedVideo = document.getElementById("video"); video.src = intentData.data; });
Comments
Pros:
- easy to use for app developers
- protocol agnostic (hn protocols are handled by the UA and hidden to the application)
Cons:
- only network protocols supported by the UA can be used (e.g. if the UA do not support UPnP, no way to communicate with a UPnP device)
- support of newer version of the protocol require UA update
notes:
- the picker application may be a integrated into the UA or be a web application running on the device (i.e. the DVR).
Opt 2
Use the discover intent.
TBD
Use case: push play
Find the video from your table/pc/mobile then render it on the TV and watch it there
Steps:
- the user browse to a page that contains a <video>
- the page ask to play the <video> on a HN device
- the UA shows to the user a list of devices able to do Playback (TV-living-room, TV-kitchen)
- The user selects TV-kitchen
- The video is rendered on TV-kitchen.
- (The user controls the video playback from the PC/tablet/phone)
Opt 1
Use the view intent.
Registration
- The UA will discover HN services able to render video content and list them to the user when the intent is started. How discovery happens is implementation specific.
- The UA is also responsible for translating messages coming from/going to the application into the appropriate format for the supported protocols (e.g. UPnP)
Invocation
- Use a URL
var intent = new Intent("http://webintents.org/view", "video/*","http://example.com/video"); window.navigator.startActivity(intent,function(intentData){ //communicate with the HN device });
- Use Activity streams video object
Comments
Pros:
- easy to use for app developers (no difference between playback on local client vs other device)
- protocol agnostic (hn protocols are handled by the UA and hidden to the application)
- no information about devices/protocol exposed to the application
Cons:
- only network protocols supported by the UA can be used (e.g. if the UA do not support UPnP, no way to communicate with a UPnP device)
- support of newer version of the protocol require UA update
Opt 2
Use the discover intent and use type to specify the network protocol
Registration
- The UA will discover HN services able to render video content and list them to the user when the intent is started. How discovery happens is implementation specific.
Invocation
- Example: UPnP AV Transport service
var intent = new Intent("http://webintents.org/discover", "urn:upnp-org:serviceId:AVTransport"); window.navigator.startActivity(intent,function(intentData){ //communicate with the HN device });
- Example: XBMC JSON/RPC
var intent = new Intent("http://webintents.org/discover", "_xbmc-jsonrpc._tcp"); window.navigator.startActivity(intent,function(intentData){ //communicate with the HN device });
Comments
Pros:
- The UA is not required to support any specific protocol for communication (discovery still needs to be supported by the UA)
- Updates in the communication protocol can be handled by the application without needs to update the browser
Cons:
- More complex for application developers if the communication protocol is complex (e.g. UPnP)
Use case: <title>
<short description>
Steps: <step by step uc description>
Opt 1
Registration
Invocation
Comments
Pros:
Cons:
Opt <n>
...