•  Player API
    • Basic usage
    • Configuration
    • Labels
    • Custom Theme Assets
    • Events
    • Key Bindings
    • Methods
    •  Player Plugins
      • Call to Action
      • Branding
      • Watermark Protection
      • Playlists
      • Multi-Channel Livestream
      • Comments
      • Quizzing
      • Peer2Peer (E-CDN)
      • Consent String
    •  Release Notes
      • v5.0
      • v5.1
      • v5.2
      • v5.3
    •  Tutorials
      •  Switch between different livestreams
        •  Use the Player with Require
      •  End of Service
        •  Knowledgebase
          •  Ports and networks
            •  Using a custom player for streaming
              •  Multilanguage Livestreaming
                •  Wirecast
                  •  Recommended livestream settings
                  •  Release Notes
                    •  Time Reference

                      Player API Tutorials Use the Player with Require

                      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.

                      Previous Next

                      © 2009 - 2023 3Q GmbH Made by 3Q