Range of bytes in the form of a linked list of NPByteRange objects, each of which specifies a request for a range of bytes.
- If successful, the function returns NPERR_NO_ERROR.
- If unsuccessful, the plug-in is not loaded and the function returns an error code. For possible values, see Error Codes.
The plug-in can use this function to make one or more requests for ranges of bytes. These requests result in subsequent calls to NPP_WriteReady and NPP_Write. For multiple requests, the function creates a linked list of NPByteRange structures, each of which represents a separate request.
If the plug-in requests multiple ranges (either through a list of NPByteRange objects in a single call to NPN_RequestRead, or multiple calls to NPN_RequestRead), the browser can write individual ranges in any order, and with any number of NPP_WriteReady and NPP_Write calls.
Seekable streams are created by calling NPP_NewStream with NP_SEEK as the stype mode.
- The plug-in can call NPN_RequestRead on streams that were not initially in NP_SEEK mode as long as the stream is inherently seekable; NPN_RequestRead automatically changes the mode to NP_SEEK.
- If the stream is not inherently seekable, the stream must have been put in NP_SEEK mode initially (since the browser must cache all the stream data on disk in order to access it randomly).
- If NPN_RequestRead is called on a stream that is not inherently seekable and not initially in mode NP_SEEK, it returns the error code NPERR_STREAM_NOT_SEEKABLE.