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

How to use the rtmp-plugin #22

Closed
lambchopinc opened this issue Jul 14, 2015 · 3 comments
Closed

How to use the rtmp-plugin #22

lambchopinc opened this issue Jul 14, 2015 · 3 comments
Labels

Comments

@lambchopinc
Copy link

I am a little confused. I try like this

<script type="text/javascript" src="http://cdn.jsdelivr.net/clappr.rtmp/0.0.6/rtmp.min.js"> </script>
<script> var player = new Clappr.Player({ source: "rtmp://xxxx/xxxx.mp4", parentId: "#player", plugins: {'playback': [RTMP]} }); </script> But it does not work, should I add <script type="text/javascript" src="http://cdn.clappr.io/latest/clappr.min.js"></script> into this? Could you give me a example about the full case? Thank you
@lambchopinc
Copy link
Author

case
Should I add this http://cdn.clappr.io/latest/clappr.min.js?

@towerz
Copy link

towerz commented Aug 11, 2015

@LampChop You are right, you need to add a script tag pointing to clappr itself. The plugins do not include the clappr code.

@flavioribeiro
Copy link
Member

here's a full working html:

<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <script type="text/javascript" charset="utf-8" src="http://cdn.clappr.io/latest/clappr.min.js"></script>
  <script type="text/javascript" charset="utf-8" src="http://cdn.jsdelivr.net/clappr.rtmp/latest/rtmp.min.js"></script>
  <title>HLSJS Test Page</title>
  <script type="text/javascript" charset="utf-8">
window.onload = function() {
  var player = new Clappr.Player({
    source: "rtmp://fms.12E5.edgecastcdn.net/0012E5/mp4:videos/8Juv1MVa-485.mp4",
    parentId: '#player-wrapper',
    plugins: { playback: [RTMP] }
  });
}
  </script>
</head>
<body>
  <div id="player-wrapper">
  </div>
</body>
</html>

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

No branches or pull requests

3 participants