streamroot / clappr-p2phls-plugin Goto Github PK
View Code? Open in Web Editor NEWBemTV peer-to-peer plugin for Clappr Player (HTTP Live Streaming, HLS, WebRTC, P2P)
Home Page: http://bem.tv
License: Apache License 2.0
BemTV peer-to-peer plugin for Clappr Player (HTTP Live Streaming, HLS, WebRTC, P2P)
Home Page: http://bem.tv
License: Apache License 2.0
For now, the player only asks for segments on the overlay when the local buffer is greater than Settings.lowBufferLength. I would like to leave this way but the first buffer should be filled with the help of the overlay.
Check on clappr loader if it gives priority to external plugins. If so, remove the 'p2p+http' on source prefix.
https://github.com/globocom/clappr/blob/master/src/components/loader/loader.js
I could notice that sometimes when a peer receives a chunk, it seems that the transmission is closed and the poster appears. Need to turn on logging to check what's going on with the events that are being dispatched.
We can start by forcing the partners to be randomly chosen from peers swarm. Since BitTorrent uses 4 peers to be partners, I think this is a good number to choose initially.
I don't think we need to report time update events if we're not planning to support DVR on live streams. I'm trying to find the route cause of #15 and could detect some overhead on this function call:
Going to remove this call from both as3 and js sides to avoid this overhead.
Bootstrap peer entrance only on play event and disconnect on stop
Use contains
There's a race condition when player state is not PLAYING BUFFERING anymore but the playback hasn't initiated yet.
If any chunk was received from p2p, the player should incentive the initial buffer to be entirely filled by peers, improving overall startupTime.
From wikipedia:
Interested; Describes a downloader who wishes to obtain pieces of a file the client has. For example, the uploading client would flag a downloading client as 'interested' if that client did not possess a piece that it did, and wished to obtain it.
Change desire command to interested.
Encode master playlist (m3u8) in base64 and use it as swarm name.
I think I can start by favoring peers on the same bitrate to be partners. Then I can take a look where peers with low bandwidth to CDN have a great connection to a peer and try to provide HD video to this poor guy.
We need a huge local buffer to avoid PLAYING_BUFFERING state
I'll need help to define the license of all this c
related to rtc-io/rtc-bufferedchannel#5
When one peer is trying to get chunks from the overlay, the buffer length keeps decreasing. Need to check choke efficiency and look at how much time it costs to send/receive one chunk. This would help Settings.timeout (#12)
https://github.com/rtc-io/rtc-signaller promotes more control like announce and filter. This issue regards the study of quickconnect substitution in order to achieve more control over webrtc stack.
I'm suspecting that storage's splice call is the guilty. Going to look at a better data structure or maybe use localStorage.
Endless recursive calls to __flash__toXML() are heating the CPU and destroying the performance on my Mac, using Firefox. I couldn't reproduce on MS Windows machine.
A post related to this problem: https://coderwall.com/p/e-8niw
Since the partner term on the architecture only accounts for one side, it's better to change this name.
while hitting play button on http://bem.tv/ using flash debug player the following exception occurs:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at org.mangui.hls.stream::FragmentLoader/_loadfirstfragment()
at org.mangui.hls.stream::FragmentLoader/_checkLoading()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
after discarding it the playback starts successfully.
Dispatch the number of chunks sent and received from p2p overlay and cdn.
It would be great to have it browserified inside the plugin or minified and placed available under http://bem.tv.
Refs #33
This singleton will store currentEntropy and averageSegmentSize, for example. This will avoid cross-access between objects in a hierarchy.
This will define the maximum round trip delay time between peers and adjust the best timeout on Settings.timeout.
Better than wait for a timeout is to receive a choke message when the peer doesn't have desired chunk.
If you render the page and wait for a long period then play, it fails to download playlist and segments.
Now I'm not adding chunks arrived from p2p to local storage, need to fix this
One ping?pong! exchange is necessary to exchange some QoE data between peers. This will support the initial score on partnership algorithm.
refs #4
I need to define how many peers one can serve. I'll define a fix number of slots on the first implementation where peers persist the time when it sent a segment and expires then as the time goes.
Now, swarmSize is updated on resourceLoaded() at main.js. Need to find a better way to detect swarm size modifications and update automatically on p2phls-stats.
related to #13
I'm choosing the first one who sends 'contain'. I think that chunks sent on p2p will increase if I choose more than one guy to send the 'request'.
swarm can use filename-level to find correct chunks
level1: http://domain.com/hls/some-secure-code-12345-/filename-240p/chunk1.ts
level2: http://domain.com/hls/some-secure-code-67890-/filename-360p/chunk1.ts
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.