HLSは広く普及している配信方式だがブラウザで直接再生できるのはSafariだけと言ってもいい。

ライブモードでのシーク動作もiOS Safariではサポートされない。
これらを回避する為に、Websocket MSE(Media Source Extention)を利用したプレイヤーを使用する。

 

組込コード

 

<html>

  <head>

    <title>VHS de HLS</title>

    <link href="https://unpkg.com/video.js/dist/video-js.min.css" rel="stylesheet">

  </head>

  <body>

    <video-js id=example-video data-setup='{"liveui": true}' width="%" height="%"

              class="vjs-default-skin vjs-default-skin vjs-16-9" autoplay muted playsinline controls>

      <source

         src="https://1.docokame.biz/dvms/HLS/2H/fujimi-2h.m3u8"

         type="application/x-mpegURL">

    </video-js>

    <script src="https://unpkg.com/video.js/dist/video.min.js"></script>

    <script>

      var player = videojs('example-video');

    </script>

  </body>

</html>

 

 

ライセンスに関して

要約すると。

 

Video.js は Apache License, Version 2.0 の下でライセンスされています。

ライセンスを確認したところ。はい、オリジナルの著作権、ライセンス、および通知を含める限り、無料でプレーヤーを使用することができます。

 

 

Copyright Brightcove, Inc.

 

   Licensed under the Apache License, Version 2.0 (the "License");

   you may not use this file except in compliance with the License.

   You may obtain a copy of the License at

 

       http://www.apache.org/licenses/LICENSE-2.0

 

   Unless required by applicable law or agreed to in writing, software

   distributed under the License is distributed on an "AS IS" BASIS,

   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

   See the License for the specific language governing permissions and

   limitations under the License.