Skip to content

Instantly share code, notes, and snippets.

@asheroto
Last active August 20, 2020 21:30
Show Gist options
  • Save asheroto/7e393ce097420a3c1ffc798f65d1a450 to your computer and use it in GitHub Desktop.
Save asheroto/7e393ce097420a3c1ffc798f65d1a450 to your computer and use it in GitHub Desktop.
var player = new Clappr.Player({
sources: [<url to m3u8 file>],
width: '100%',
height: '100%',
autoPlay: true,
disableVideoTagContextMenu: true,
hideMediaControl: true,
parentId: "#player",
playbackNotSupportedMessage: 'No available streams',
plugins: [HlsjsPlayback],
hlsUseNextLevel: false,
hlsRecoverAttempts: 8,
playback: {
extrapolatedWindowNumSegments: 2,
triggerFatalErrorOnResourceDenied: false,
hlsjsConfig: {
debug: true,
"nudgeOffset": 5,
"startFragPrefetch": true,
},
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment