Shaka Player Embedded
|
#include <net.h>
Classes | |
class | Client |
Public Member Functions | |
SchemePlugin () | |
virtual | ~ SchemePlugin () |
SchemePlugin (const SchemePlugin &)=delete | |
SchemePlugin & | operator= (const SchemePlugin &)=delete |
SchemePlugin (SchemePlugin &&)=delete | |
SchemePlugin & | operator= (SchemePlugin &&)=delete |
virtual std::future< optional< Error > > | OnNetworkRequest (const std::string &uri, RequestType type, const Request &request, Client *client, Response *response)=0 |
Defines an interface for network scheme plugins. These are used by Shaka Player to make network requests. Requests can be completed asynchronously by returning a std::future
instance. This may be called while an asynchronous request is still completing, but won't be called concurrently. This is called on the JS main thread, so it is preferable to avoid lots of work and do it asynchronously.
shaka::SchemePlugin::SchemePlugin | ( | ) |
|
virtual |
|
delete |
|
delete |
|
pure virtual |
Called when the player wants to make a network request. This is expected to read the Request object and load the data into the response object. The objects will remain valid until the returned future resolves.
uri | The current URI of the request. |
type | The type of request. |
request | The request info. |
client | A client object used to send events to. |
response | The object to fill with response data. |
|
delete |
|
delete |