HTML5网页视频播放器在线源码(Fluid+Media)

admin 2020-02-11 AM 166℃ 0条

Fluid代码 官网

<html>
<head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="//cdn.fluidplayer.com/v2/current/fluidplayer.min.css" />
</head>
<body>
  <script src="https://cdn.fluidplayer.com/v2/current/fluidplayer.min.js"></script>
  <video src="http://t.cn/video" id="my-video" type="video/mp4" width="100%" controls="controls">
</body>
<script type="text/javascript">
  fluidPlayer("my-video");
</script>
</html>

Media代码

<html>
<head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.9/mediaelementplayer.css" />
</head>
<body>
  <script src="//cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.9/mediaelement-and-player.js"></script>
  <video id="player" width="640" height="360">
</body>
<script type="text/javascript">
      var player = new MediaElementPlayer('player', {
        success: function(mediaElement, originalNode) {
          console.log("Player initialised");
        }
      });
        player.setSrc("http://t.cn/A6hvsb8v");
</script>
</html>

标签: none

非特殊说明,本博所有文章均为博主原创。

评论啦~