Comments (17)
You have to configure P2P Hls.js Engine instance like this:
var engine = new p2pml.hlsjs.Engine({
loader: {
trackerAnnounce: [ "wss://tracker1.xyz/", "wss://tracker2.com/" ]
}
});
Engine configuration documentation:
https://github.com/Novage/p2p-media-loader/tree/master/p2p-media-loader-hlsjs#engine--new-enginesettings
HybridLoader settings documentaion (i.e. loader
section of settings
object):
https://github.com/Novage/p2p-media-loader/tree/master/p2p-media-loader-core#loader--new-hybridloadersettings
from p2p-media-loader.
"@hola.org/jwplayer-hlsjs" is not initialized. You have to add https://cdn.jsdelivr.net/npm/hls.js@latest script.
Then in a browser's console you will see 'init hola/hls provider v0.0.79 hls v0.11.0' message. It means that the provider is initialized.
from p2p-media-loader.
Thanks, that worked.
Another question, I have some configurations from my old HLS provider and I would like to make some changes to the P2P configuration (like changing the tracker). But I could not change the default settings for HLS and P2P. Can you give me a little help with that? I do not have an intermediate knowledge in javascript
I read the explanation at https://github.com/Novage/p2p-media-loader/tree/master/p2p-media-loader-core#p2p-media-loader-core, but I did not quite understand
from p2p-media-loader.
Thank you, your help is very appreciated :)
from p2p-media-loader.
I reopened this to ask one more info.
How can I get the player to give more buffering (up to 60 seconds of video)? After I implemented the script, I noticed that at the beginning of the video buffering can not get past 1 second, and sometimes this causes a "lag" even without having problems with server-user.
I'm using this:
p2pml.hlsjs.initJwPlayer(player, { maxBufferSize: 100*1000*1000, maxBufferLength: 300, maxMaxBufferLength: 500, loader: engine.createLoaderClass() });
but it does not seem to have any effect
from p2p-media-loader.
You have to use liveSyncDuration parameter of Hls.js playback engine. It is in seconds.
p2pml.hlsjs.initJwPlayer(player, {liveSyncDuration: 60, loader: engine.createLoaderClass() });
from p2p-media-loader.
Nothing changed :/
from p2p-media-loader.
It seems that the script is using the standard HLS settings of jwplayer (with very low buffer). But by the console, who is loading the segments is the "p2p-media-loader-hlsjs.min.js"
from p2p-media-loader.
Most likely buffering issues are related to Hls.js engine itself.
You have to test it with raw Hls.js without P2P and player integrations. And if it doesn't work as expected report issues to Hls.js project.
You can use this fiddle as the base for your testing: https://jsfiddle.net/yhLnqu3t/
from p2p-media-loader.
I get this result running only hls.js, without P2P script. I think "p2p-media-loader-hlsjs.min.js" is not interpreting the hls.js settings. The settings of the script itself work (such as changing the tracker), only the hls.js settings have no effect.
from p2p-media-loader.
I make this fiddle if you want to view what i'm saying: https://jsfiddle.net/hmyapb2n/1/
from p2p-media-loader.
There is another way of initialization that should be more correct. Please check if it works for you. Also it will output hls.js configuration into console:
var engine = new p2pml.hlsjs.Engine();
var player = jwplayer("player");
player.setup({
autostart: true,
sources: [{
file: "https://wowza.peer5.com/live/smil:bbb_abr.smil/playlist.m3u8",
type: "mp4"
}],
});
player.hola_config = {
liveSyncDuration: 60,
loader: engine.createLoaderClass()
};
var provider = require("@hola.org/jwplayer-hlsjs");
provider.attach();
p2pml.hlsjs.initJwPlayer(player);
setTimeout(() => console.log(player.hls.config), 2000);
from p2p-media-loader.
No results. Something is stucking "maxBufferLength" to 30 seconds, like the jwplayer default hls provider. In console, the config is showed as expected. But in player don't work :/
https://jsfiddle.net/hmyapb2n/2/
from p2p-media-loader.
I see other issue here. When the jwplayer is configured to show ads with VAST (not tested with google IMA), the player dies with error "Error in "time" event handler: TypeError: Cannot convert undefined or null to object". The player also does not save the quality and audio settings, and I saw that in later versions the subtitles also do not work as they should. Apparently these problems are from the holajs provider. Is there any way to use another HLS provider?
Advertisement test: https://jsfiddle.net/hmyapb2n/4/
from p2p-media-loader.
Looks like the problems go from hola HLS provider.
P2P Media Loader supports hls.js and Shaka Player playback engines. We can integrate with players that use one of these playback engines built-in or via a plugin.
In the case of JWPlayer we found only this plugin that works via hls.js
from p2p-media-loader.
Hi Yokutto, how do you check if liveSyncDuration setting is applied? I just tried mrlika's example and it worked. But would like to see what you're getting and how did you solve it if you did?
thanks
from p2p-media-loader.
Can't reproduce the issue - JWPlayer requires a paid plan to display VAST. Open source JWPlayer has no VAST support.
from p2p-media-loader.
Related Issues (20)
- someone trying to repair this repo?
- is there any way to stream video from torrent file
- How do I add my wt-tracker to p2p-media-loader? HOT 1
- p2p loader can't work on google chrome version 110.0.0.0 HOT 1
- Not working in the latest version of Chrome HOT 4
- Create 3 folders with NPM packages
- Create simple hls.js loader plugin
- WebSocket connection to 'wss://tracker.novage.com.ua/' failed: HOT 1
- How to integrating into Reactjs HOT 1
- Peers wont connect !! HOT 5
- Working on firefox and old chrome browsers but not working with latest versions of chrome please help. HOT 7
- Peers are not connecting cross-browser for example chrome peers only connecting with Chrome peers and Firefox only connecting with Firefox peers. Anyone knows the solution ?
- Does the next version support videojs? HOT 1
- Anyone have luck installing on JW Player?
- Release v1 HOT 2
- Not Working P2P HOT 2
- host in mau domain pleass anser HOT 1
- p2pδΈε·₯δ½ HOT 4
- V1 Can't start HOT 2
- test
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from p2p-media-loader.