A method of retrieving media data by a middleware unit (100; 188) of a client device, wherein the middleware unit (100; 188) controls a hypertext transfer protocol, HTTP, proxy unit (108; 234) of the client device, and wherein the client device includes a local server unit (102; 238), a proxy control unit and a cache, and is configured to direct requests for media data to an address advertised in a manifest file, the address indicating an address from which media data is available the method comprising, by the middleware unit (100; 188): receiving a first set of media data of a first representation of a media session via a broadcast service and storing the media data in the cache so that the first set of media data is available from the local server unit; receiving, at the proxy control unit from the local server unit, a list of cached segments available from the local server unit; determining that the broadcast service is no longer available after receiving the first set of media data; receiving, based on the determination that the broadcast service is no longer available, a request from a streaming application executed by the client device to retrieve a second set of media data of a second representation different from the first representation of the media session via a unicast service, wherein the request specifies an address external to the client device based on the manifest file; determining, by the proxy control unit based on the list, if the first representation of the requested second set of media data is available from the local server unit; and when it is determined that the second set of media data is available in the first representation from the local server unit: sending from the proxy control unit a Server and Network assisted DASH, SAND, assistance message to inform the streaming application that the requested second set of media data of the first representation is already cached; and requesting by the streaming application the second set of media data in the first representation from the local server unit. receiving a first set of media data of a first representation of a media session via a broadcast service and storing the media data in the cache so that the first set of media data is available from the local server unit; receiving, at the proxy control unit from the local server unit, a list of cached segments available from the local server unit; determining that the broadcast service is no longer available after receiving the first set of media data; receiving, based on the determination that the broadcast service is no longer available, a request from a streaming application executed by the client device to retrieve a second set of media data of a second representation different from the first representation of the media session via a unicast service, wherein the request specifies an address external to the client device based on the manifest file; determining, by the proxy control unit based on the list, if the first representation of the requested second set of media data is available from the local server unit; and when it is determined that the second set of media data is available in the first representation from the local server unit: sending from the proxy control unit a Server and Network assisted DASH, SAND, assistance message to inform the streaming application that the requested second set of media data of the first representation is already cached; and requesting by the streaming application the second set of media data in the first representation from the local server unit. sending from the proxy control unit a Server and Network assisted DASH, SAND, assistance message to inform the streaming application that the requested second set of media data of the first representation is already cached; and requesting by the streaming application the second set of media data in the first representation from the local server unit.