Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

browser-readablestream example not working #676

Open
Aiaminm opened this issue Jan 5, 2023 · 1 comment
Open

browser-readablestream example not working #676

Aiaminm opened this issue Jan 5, 2023 · 1 comment

Comments

@Aiaminm
Copy link

Aiaminm commented Jan 5, 2023

屏幕截图(1)
How to play mp4 more easily? I'm not good at streaming..

@dasein108
Copy link

I did such workaround and it works.

import { Readable } from "readable-stream";
....

// This stream will contain the requested bytes
stream = Readable.from(
  ipfs.cat(DOM.cidInput().value.trim(), {
    offset: start,
    length: end && end - start,
  })
);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants