[CDS API] Client/Device ID

Issue #622 resolved
Will Lunniss created an issue

The CDS API tracks clients by IP address, if the IP changes (switch from 3G -> WiFi etc..) then any transcoding jobs will not be resused (and the existing job will keep running)

Proposal: When logging into the API, the client should supply a client ID if it has one saved or null. The server should read the supplied client ID or generate a client ID (similar to the unique id's it has for devices), and return that as a header/parameter. The client should then persist this ID indefinately. When the client requests conent, they should supply that client ID as either a header or as a url parameter (both should be support to work with 3rd party video players that don't support headers/cookies). This ID can then be used by server to correctly identify the same client, which for now lets it re-use transcoding jobs.

This could be implemented in the MediaBrowser as a cookie.

It could be futher used in the future to support restricting browsing for CDS clients by also supplying the ID with every browse request.

Comments (9)

  1. Petr Nejedly repo owner

    Should the server be responsible for the ID generation? I'd have thought that if the client sends it, use that. Otherwise use the incoming IP address (so no need to make any change to MB for example).

  2. Petr Nejedly repo owner

    Actually, I have to look if this is even needed, as transcoding jobs are identified only by profile ID, not IP address. It might still be relevant when it counts if there are still any clients using the same stream.

  3. Will Lunniss reporter

    OK, the client can generate it as per a spec that the server dictates.

    What happens if two devices with the same public IP at a remote location are accessing the same server and streaming different videos?

  4. Petr Nejedly repo owner

    Added HTTP header X-Serviio-ClientId which can include any string uniquely identifying the client (app+installation).

    Will add URL parameters in future if it's needed.

  5. Will Lunniss reporter

    I've had a look and there is no way that I can tell a third party video player to use this header so until I have a working video player I will not be able to use this. Please could you add a url parameter for it as well?

  6. Log in to comment