Lumen help

Integrating Mesh Delivery with Kaltura

Introduction

Step 1: Add Mesh Delivery as a custom script file

                //cdn.streamroot.io/kaltura-hls-dna-plugin/1/stable/kaltura-hls-dna-plugin.js?srKey=YOUR_STREAMROOT_KEY 
            

Step 2: Add Mesh Delivery options

Add the following 'Options' as new objects:

                streamrootKey    YOUR_STREAMROOT_KEY
dnaConfig        ()
hlsjsConfig      ()

            
Adding mesh delivery options on the Kaltura console

Step 3: Visualize Mesh Delivery stats in your console

To display basic DNA stats in your browser console, copy/paste the following snippet in the "Custom script" input of your player:

                !function(){function n(){if(window.frames[0].Streamroot.instances.length){var n=window.frames[0].Streamroot.instances[0].stats,t=n.allContents.dnaDownload?n.allContents.dnaDownload/(n.allContents.dnaDownload+n.allContents.cdnDownload)*100:0,a={upload:o(n.allContents.dnaUpload),dna:o(n.allContents.dnaDownload),cdn:o(n.allContents.cdnDownload),efficiency:`${t}%`,peers:n.realtime.dnaSources};console.table(a)}else console.warn("Streamrooot not initialized")}function o(n,o=10){if(0===n)return"0B";var t=o+1||1,a=Math.floor(Math.log(n)/Math.log(1e3));return parseFloat((n/1e3**a).toFixed(t))+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][a]}setInterval(()=>{n()},1e4),n()}();
            

You should have the following table, which is updated every 10 seconds:

Mesh Delivery stats on browser console

Recommended Hls.js options

                hlsjsConfig    ("maxBufferSize": 0, "maxBufferLength": 30, "liveSyncDuration": 30)