feat(hls): add xhrSetup withCredentials to hls.js instances in visuals.jsx
This commit is contained in:
parent
39e010544c
commit
01a19c0d69
1 changed files with 9 additions and 1 deletions
|
|
@ -58,6 +58,9 @@ function AssetThumb({ asset, size = 'md' }) {
|
|||
);
|
||||
}
|
||||
|
||||
// VOD HLS assets: if we have an HLS rendition, we could potentially show a
|
||||
// muted hover-preview here too. For now, just static thumb.
|
||||
|
||||
const altText = asset.name ? `Thumbnail for ${asset.name}` : 'Asset thumbnail';
|
||||
return (
|
||||
<div className="asset-thumb" style={{ background: 'var(--bg-2)', aspectRatio: aspect, overflow: 'hidden', position: 'relative' }}>
|
||||
|
|
@ -112,7 +115,12 @@ function LiveThumb({ assetId, aspect }) {
|
|||
|
||||
const startHls = () => {
|
||||
if (destroyed) return;
|
||||
hls = new window.Hls({ liveSyncDurationCount: 2, lowLatencyMode: true, maxBufferLength: 10 });
|
||||
hls = new window.Hls({
|
||||
liveSyncDurationCount: 2,
|
||||
lowLatencyMode: true,
|
||||
maxBufferLength: 10,
|
||||
xhrSetup: (xhr) => { xhr.withCredentials = true; }
|
||||
});
|
||||
hls.loadSource(url);
|
||||
hls.attachMedia(v);
|
||||
hls.on(window.Hls.Events.MANIFEST_PARSED, () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue