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

Update for latest IPFS, bug fix. #10

Merged
merged 2 commits into from
Jul 25, 2019
Merged

Update for latest IPFS, bug fix. #10

merged 2 commits into from
Jul 25, 2019

Conversation

vaultec81
Copy link
Collaborator

No description provided.

@alanshaw
Copy link

This switches to using the buffered version of ipfs.cat which means you'll have to wait for the whole video to download before it'll play. The fix in #9 should be enough.

@pgc-13
Copy link
Owner

pgc-13 commented Jul 17, 2019

Closing this as invalid

@pgc-13 pgc-13 closed this Jul 17, 2019
@vaultec81
Copy link
Collaborator Author

@alanshaw It would not make any difference.
https://github.com/moshisushi/hlsjs-ipfs-loader/blob/81847d010968995df20f8db97fe41a4894a7b1c9/src/index.js#L98-L100
Callback is only returned when the stream has ended. HLS is chunked into multiple .ts files, only one is needed for about 5-10 seconds of playback depending on the chunk segment length.

@alanshaw
Copy link

Ah yes you're correct my apologies.

@pgc-13
Copy link
Owner

pgc-13 commented Jul 24, 2019

@alanshaw @vaultec81 you guys reckon the buffered version is actually better then, as in less code with no loss in performance? I guess this PR overlaps with #9 so can either merge, or if you want to open a new one.

@pgc-13 pgc-13 reopened this Jul 25, 2019
@alanshaw
Copy link

Both versions are buffering. The current version using ipfs.catReadableStream is just doing what ipfs.cat does under the hood.

It would be better to stream it if possible.

@pgc-13
Copy link
Owner

pgc-13 commented Jul 25, 2019

@alanshaw But you can't inject a partial ts fragment into the HLS stream, afaik, so what additional benefit would that have? The low latency play and seek functionality is something you get from HLS by design, as streams are always pre-fragmented and only need a handful of fragments to get going (this is what @vaultec81 mentioned above). Sorry if I'm missing the point!

@vaultec81
Copy link
Collaborator Author

@moshisushi @alanshaw The issue I was experiencing was the stream was never closed. After some repeated testing I could not figure out why the stream wasn't ending. Which is why i put in ipfs.cat instead. This seemed to solve my issue in test case. (This was before @alanshaw's PR was merged)

correction: They are about the same performance/speed wise. ipfs.cat is a little bit faster (side by side comparison). @alanshaw you mentioned it does the same thing under the hood. But does ipfs.cat grab all the file leafs sequentially or all at once?

@pgc-13 pgc-13 merged commit 37847f4 into pgc-13:master Jul 25, 2019
@pgc-13
Copy link
Owner

pgc-13 commented Jul 26, 2019

@vaultec81 Thanks for this. This PR has been included in release 0.1.5.

https://www.npmjs.com/package/hlsjs-ipfs-loader/v/0.1.5

Cheers!

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

Successfully merging this pull request may close these issues.

3 participants