p2p-media-loader icon indicating copy to clipboard operation
p2p-media-loader copied to clipboard

JWPlayer not auto buffering

Open hoangvietfreelancer opened this issue 3 years ago • 6 comments

I notice that httpDownloadProbabilitySkipIfNoPeers: true stop my JWPlayer auto buffering from HTTP when no peer(it's only buffering when it played all buffered segment, and it still takes some seconds after all buffered segment played to downloads new segments)

Environment

  • JW Player 8.17.5
  • P2P and JWPlayer config:
const config = {
	loader: {
		httpDownloadProbabilitySkipIfNoPeers: true
	}
};

var engine = new p2pml.hlsjs.Engine(config);
player.setup({
	file: url,
	type: "hls",
	androidhls: "true",
	preload: "auto",
	width: "100%",
	aspectratio: "16:9",
	playbackRateControls: [0.75, 1, 1.5, 2],
	hlsjsConfig: {
		liveSyncDurationCount: 6,
		liveSyncDuration: 60,
		loader: engine.createLoaderClass()
	},
	"cast": {}
});

hoangvietfreelancer avatar Sep 24 '20 13:09 hoangvietfreelancer

Same problem here.

jhemmmm avatar Sep 24 '20 19:09 jhemmmm

@mrlika do you have an email I can contact you at for a pseudo-solution I came up with to discuss and potentially put here?

Denoder avatar Oct 20 '20 10:10 Denoder

Im gonna post anyway, but i was sifting through the provider file and there are default values for it:

autoStartLoad: !1,
testBandwidth: !1,
maxBufferSize: 3e7,
maxMaxBufferLength: b.a,
liveBackBufferLength: 900,
capLevelToPlayerSize: !1,
renderNatively: n,
renderTextTracksNatively: n,
debug: !!T && i,
captionsTextTrack1Label: "Unknown CC",
captionsTextTrack2Label: "Unknown CC",
captionsTextTrack1LanguageCode: "",
captionsTextTrack2LanguageCode: "",
progressive: !1

i made a copy of the provider altered it to change maxBufferSize and maxMaxBufferLength and added the provider to a global scope so hls.js can override the integrated jwplayer hls.js, and it's been working since.

Denoder avatar Oct 22 '20 02:10 Denoder

Im gonna post anyway, but i was sifting through the provider file and there are default values for it:

autoStartLoad: !1,
testBandwidth: !1,
maxBufferSize: 3e7,
maxMaxBufferLength: b.a,
liveBackBufferLength: 900,
capLevelToPlayerSize: !1,
renderNatively: n,
renderTextTracksNatively: n,
debug: !!T && i,
captionsTextTrack1Label: "Unknown CC",
captionsTextTrack2Label: "Unknown CC",
captionsTextTrack1LanguageCode: "",
captionsTextTrack2LanguageCode: "",
progressive: !1

i made a copy of the provider altered it to change maxBufferSize and maxMaxBufferLength and added the provider to a global scope so hls.js can override the integrated jwplayer hls.js, and it's been working since.

@Teranode That's interesting! Would you please provide more details or examples of it? P/s Sorry if my English is bad

hoangvietfreelancer avatar Oct 26 '20 16:10 hoangvietfreelancer

Im gonna post anyway, but i was sifting through the provider file and there are default values for it:

autoStartLoad: !1,
testBandwidth: !1,
maxBufferSize: 3e7,
maxMaxBufferLength: b.a,
liveBackBufferLength: 900,
capLevelToPlayerSize: !1,
renderNatively: n,
renderTextTracksNatively: n,
debug: !!T && i,
captionsTextTrack1Label: "Unknown CC",
captionsTextTrack2Label: "Unknown CC",
captionsTextTrack1LanguageCode: "",
captionsTextTrack2LanguageCode: "",
progressive: !1

i made a copy of the provider altered it to change maxBufferSize and maxMaxBufferLength and added the provider to a global scope so hls.js can override the integrated jwplayer hls.js, and it's been working since.

What do you mean by the provider?. the hls.js or the jwplayer.hlsjs.js thing?.

jhemmmm avatar Feb 04 '21 17:02 jhemmmm

@jhemmmm @hoangvietfreelancer

Refer to this post: https://github.com/Novage/p2p-media-loader/issues/174

Denoder avatar Feb 04 '21 21:02 Denoder