Code Monkey home page Code Monkey logo

Comments (3)

mrlika avatar mrlika commented on September 13, 2024 2

Implemented consumeOnly configuration parameter:

const engine = new p2pml.hlsjs.Engine({
    loader: {
        consumeOnly: isMobile()
    }
});

from p2p-media-loader.

mrlika avatar mrlika commented on September 13, 2024

Sure, but p2p-media-loader itself has single responsibility - download media via P2P. Everything else you can easily implement on top of it:

var player;
if (isMobile()) { // Create Clappr with P2P
    var engine = new p2pml.hlsjs.Engine();

    player = new Clappr.Player({
        parentId: "#player",
        source: "https://akamai-axtest.akamaized.net/routes/lapd-v1-acceptance/www_c4/Manifest.m3u8",
        mute: true,
        autoPlay: true,
        playback: {
            hlsjsConfig: {
                liveSyncDurationCount: 7,
                loader: engine.createLoaderClass()
            }
        }
    });

    p2pml.hlsjs.initClapprPlayer(player);
} else { // Create Clappr without P2P
    player = new Clappr.Player({
        parentId: "#player",
        source: "https://akamai-axtest.akamaized.net/routes/lapd-v1-acceptance/www_c4/Manifest.m3u8",
        mute: true,
        autoPlay: true
    });
}

from p2p-media-loader.

DenisFeedYT avatar DenisFeedYT commented on September 13, 2024

Ok, its no problem, but
how to configure mobile peers that they only download
( through p2p)
and were not seeders ?
... I mean similar mode as peer5 mode "Consume only - Cellular users will not upload data to the P2P network. They can still download from non-cellular peers"

Thanks.

from p2p-media-loader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.