mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 07:34:41 +01:00
Add cb, offset and end parameters to getStream
This commit is contained in:
parent
b11e2c827c
commit
c339f86100
@ -1 +1 @@
|
|||||||
Subproject commit af1848cae0e3b9d0c0c9a73e0b080f9d5714b14e
|
Subproject commit 613d1949feefd1c8018995901fad6a9916eb8703
|
@ -112,9 +112,10 @@ abstract class Media extends IpcCapable implements JsonSerializable
|
|||||||
/**
|
/**
|
||||||
* Get a readable amp stream with the file contents.
|
* Get a readable amp stream with the file contents.
|
||||||
*
|
*
|
||||||
|
* @param ?(callable(float, float, float): void) $cb Progress callback
|
||||||
*/
|
*/
|
||||||
public function getStream(): ReadableStream
|
public function getStream(?callable $cb = null, int $offset = 0, int $end = -1): ReadableStream
|
||||||
{
|
{
|
||||||
return $this->getClient()->downloadToReturnedStream($this);
|
return $this->getClient()->downloadToReturnedStream($this, $cb, $offset, $end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user