YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.share.ServerSideSeeking Class Reference

The decision of the server-side time range management ("enable server-side time range management in proxy mode"): some renderers cannot seek, they re-request the file with a range that is wrong for the position they should be at. More...

Collaboration diagram for de.yaacc.share.ServerSideSeeking:
Collaboration graph

Static Public Member Functions

static long plan (RendererStateMap states, String deviceId, LongSupplier storedPosition, long totalSize)
 Called for a request that carries a Range header.
 

Detailed Description

The decision of the server-side time range management ("enable server-side time range management in proxy mode"): some renderers cannot seek, they re-request the file with a range that is wrong for the position they should be at.

For an http(s) share and a renderer that has the per-device setting on, the server replaces the requested start by the byte position it estimates for the renderer's playback time. Plain Java; the caller owns the network (the file size) and the preferences (the stored position).

Member Function Documentation

◆ plan()

static long de.yaacc.share.ServerSideSeeking.plan ( RendererStateMap states,
String deviceId,
LongSupplier storedPosition,
long totalSize )
static

Called for a request that carries a Range header.

Parameters
statesthe share's renderer states
deviceIdthe renderer's id from the URL (validated here; an invalid id changes nothing)
storedPositionsupplies the position stored after the last seek, in milliseconds; called only when the renderer has no state yet
totalSizesize of the file, <= 0 if unknown
Returns
the byte position to start at (> 0), or 0 to leave the requested range as it is
Here is the call graph for this function:

The documentation for this class was generated from the following file: