VideoJS flash player Buffertime設定はできない

映像編集

本ページは広告が含まれています。気になる広告をクリック頂けますと、サーバ運営費になります(^^

VideoJSには、SWF APIが準備されていた

http://docs.videojs.com/docs/api/flash.html
Flash Media Controller – Wrapper for fallback SWF API

もしかして、このAPIを利用すればBufferTimeを調整できるのではないかと設置してみた。

結論から
http://stackoverflow.com/questions/26637251/buffer-length-setting-for-video-

js-flash-plugin
The 1s buffer appears to be hardcoded, so there’s not currently going to be any top-level player options you can set to change that. While not ideal, you can always modify and build your own swf. Also you can submit an issue on the swf repo requesting that be exposed.

1秒のバッファはコーディングされているが、それを変更する方法はない。

同様の質問をgithubでも投げているが、誰も返答していない状況
https://github.com/videojs/video-js-swf/issues/129

つまり、できないのだと思う。

このAPI使えるようになるまでのマニュアルがなかなか見つからない。試行錯誤してとりあえず動いたのがこのHTML

<html>
<head>
<link href="http://vjs.zencdn.net/5.11.6/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/5.11.6/video.js"></script>
<script>
videojs.options.flash.swf = "http://vjs.zencdn.net/4.2/video-js.swf"
var hsnPlayer;

videojs("video_player").ready(function () {
    hsnPlayer = this;
    hsnPlayer.play();

});
</script>
</head>
<body>

<video id="video_player" class="video-js vjs-default-skin" controls preload="auto" width="1280" height="720" data-setup='{ "autoplay": true, "techOrder": ["flash"] }'>
    <source src="rtmp://video02.hanako.or.jp/live/test" type='rtmp/mp4'>
</video>

 

 

タイトルとURLをコピーしました