From c0e34dc7a2ab2fc75ddf16d113174c10baeae548 Mon Sep 17 00:00:00 2001 From: good Chen <77272869+youxiuchen@users.noreply.github.com> Date: Sun, 10 Sep 2023 18:51:35 +0800 Subject: [PATCH] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新文档 --- README.md | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 603287e..831c74c 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,44 @@ [西瓜官方文档](http://h5player.bytedance.com/) - ### 魔改说明 因业务需要特基于西瓜播放器源代码基础上进行魔改,使其支持ws-flv协议。后续考虑在此基础上再添加其他解码功能。使用方法与官方保持一致。 -flv插件自行打包安转自己项目中 - [flv视频演示地址](http://h5player.bytedance.com/) +flv插件自行打包安转自己项目中 + +ws-flv示例页面 (https://github.com/youxiuchen/xgplayerpro/edit/main/fixtures/flv/index.html) + +页面调试 + +``` +yarn +yarn build:flv +以服务形式打开flv示例页面 + +``` + +``` +// 打包flv插件 + 执行 yarn build +选择 xgplayer-flv + + +// 项目中引入 +import FlvPlayer from 'xgplayer-flv插件路径' + + +//使用 + +new window.Player({ + id: 'mse', + isLive: true, + playsinline: true, + url: 'http://127.0.0.1:8081/live/liveStream.flv', + autoplay: true, + height: window.innerHeight, + width: window.innerWidth, + plugins: [window.FlvPlayer] + }) +```