Implementing 3q.js with require.js

For using 3q.js player in combination with require.js, you have to add this configuration to require.js.

// require.js config
requirejs.config({
  // Other configuration
  shim: {
    // Other shims
    'https://player.3qsdn.com/bin/hls.v1.2.0.js': {
      deps: ['require'],
      exports: 'Hls',
    },
  },
})

// later in code
window.Hls = Hls

Back to index.