1. 程式人生 > >m3u8直播hls流視訊

m3u8直播hls流視訊

使用阿里的流視訊播放器:

<!DOCTYPE html>

<html>

    <head>

        <meta charset="utf-8">

        <meta http-equiv="x-ua-compatible" content="IE=edge" >

        <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"/>

        <title>Aliplayer線上配置</title>

    </head>

    <body>

        <div class="prism-player" id="player-con"></div>

        <script>

        var player = new Aliplayer({

          "id": "player-con",

          "width": "100%",

          "height": "500px",

          "autoplay": true,

          "isLive": false,

          "rePlay": false,

          "playsinline": true,

          "preload": true,

          "controlBarVisibility": "hover",

          "useH5Prism": true

        }, function (player) {

            console.log("播放器建立了。");

          }

        );

        </script>

    </body>

</html>