Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests were broken in the last commit #86

Closed
oHervis opened this issue Oct 5, 2022 · 2 comments
Closed

Unit tests were broken in the last commit #86

oHervis opened this issue Oct 5, 2022 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@oHervis
Copy link

oHervis commented Oct 5, 2022

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

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

@oHervis oHervis added the question Further information is requested label Oct 5, 2022
@leaofelipe leaofelipe self-assigned this Dec 6, 2022
@ogunkarakus
Copy link
Contributor

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/[email protected]/dist/clappr-core.js"></script>
  <script charset="UTF-8" src="https://cdn.jsdelivr.net/npm/@clappr/[email protected]/dist/clappr-plugins.js"></script>
  <script charset="UTF-8" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/hls.light.js"></script>
  <script charset="UTF-8" src="https://cdn.jsdelivr.net/npm/@clappr/[email protected]/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/[email protected]/dist/clappr-core.js"></script>
  <script charset="UTF-8" src="https://cdn.jsdelivr.net/npm/@clappr/[email protected]/dist/clappr-plugins.js"></script>
  <script charset="UTF-8" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/hls.light.js"></script>
  <script charset="UTF-8" src="https://cdn.jsdelivr.net/npm/@clappr/[email protected]/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>

@leaofelipe
Copy link
Member

Fixed on this PR #91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants