clappr/clappr-core

Unit tests were broken in the last commit

oHervis opened this issue · 2 comments

What do you want to do with Clappr?
Just run unit tests

get activePlaybackEl() { return this.activePlayback.$el.find('video')[0] || this.activePlayback.el }

Test code is here:

When @clappr/core version is 0.4.21 test code is works well. But 0.4.22 is not.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="player-wrapper"></div>
  <script src="https://cdn.jsdelivr.net/npm/@clappr/core@0.4.22/dist/clappr-core.js"></script>
  <script charset="UTF-8" src="https://cdn.jsdelivr.net/npm/@clappr/plugins@0.4.16/dist/clappr-plugins.js"></script>
  <script charset="UTF-8" src="https://cdn.jsdelivr.net/npm/hls.js@1.2.9/dist/hls.light.js"></script>
  <script charset="UTF-8" src="https://cdn.jsdelivr.net/npm/@clappr/hlsjs-playback@0.6.0/dist/hlsjs-playback.external.js"></script>
  <script>
    let playerElement = document.getElementById("player-wrapper")
    Clappr.Loader.registerPlayback(HlsjsPlayback)
    Clappr.Loader.registerPlugin(ClapprPlugins.Poster)
    Clappr.Loader.registerPlugin(ClapprPlugins.WaterMark)
    let player = new Clappr.Player({
      autoPlay: true,
      chromeless: true,
      debug: true,
      height: 360,
      mute: true,
      source: "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8",
      width: 640
    })
    player.attachTo(playerElement)
  </script>
</body>
</html>

Interestingly, this example works well.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="player-wrapper"></div>
  <script src="https://cdn.jsdelivr.net/npm/@clappr/core@0.4.22/dist/clappr-core.js"></script>
  <script charset="UTF-8" src="https://cdn.jsdelivr.net/npm/@clappr/plugins@0.4.16/dist/clappr-plugins.js"></script>
  <script charset="UTF-8" src="https://cdn.jsdelivr.net/npm/hls.js@1.2.9/dist/hls.light.js"></script>
  <script charset="UTF-8" src="https://cdn.jsdelivr.net/npm/@clappr/hlsjs-playback@0.6.0/dist/hlsjs-playback.external.js"></script>
  <script>
    let playerElement = document.getElementById("player-wrapper")
    Clappr.Loader.registerPlayback(HlsjsPlayback)
    let player = new Clappr.Player({
      autoPlay: true,
      chromeless: true,
      debug: true,
      height: 360,
      mute: true,
      plugins: ClapprPlugins.Plugins,
      source: "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8",
      width: 640
    })
    player.attachTo(playerElement)
  </script>
</body>
</html>

Fixed on this PR #91