alilmq / livedemo Goto Github PK
View Code? Open in Web Editor NEWReact实现的移动和桌面直播demo,包含直播、回放、播放历史、自动适配移动版或桌面版播放等功能,解决了微信Android自动弹出全屏播放的问题。
React实现的移动和桌面直播demo,包含直播、回放、播放历史、自动适配移动版或桌面版播放等功能,解决了微信Android自动弹出全屏播放的问题。
只改过以下三个参数:
文档和demo中都没有找到。后续会支持吗?
另外,在尝试一个页面两个实例时,有一个实例播放异常。
从直播切换到点播,先释放播放器,示例代码如下:
if(player != null){
player.dispose(); //销毁
$('#J_prismPlayer').empty();
}
player = new Aliplayer( {
id : "J_prismPlayer",
width : '100%',
preload : true,
language : 'zh-cn',
useHlsPluginForSafari : true,
enableStashBufferForFlv : true,
controlBarVisibility : 'always',
playsinline : true,
isLive : false,
cover: cover,
vid:vid,
playauth: res.playAuth,
width : "100%",
height : "641px"// 播放器宽度
}, function(){
$("#coverImg").hide();
console.log("视频点播");
});
报错如下:
Uncaught TypeError: Cannot read property 'vdata1527726943120' of null
at Object.b.exports.getData (aliplayer-min.js:2)
at Object.b.exports.on (aliplayer-min.js:2)
at c.bindEvent (aliplayer-min.js:5)
at c. (aliplayer-min.js:5)
at HTMLDivElement.e (aliplayer-min.js:2)
at HTMLDivElement.h.dispatcher.h.dispatcher (aliplayer-min.js:2)
at Object.b.exports.trigger (aliplayer-min.js:2)
at c.l.trigger (aliplayer-min.js:5)
at c.z.initChildren (aliplayer-min.js:3)
at c.init (aliplayer-min.js:3)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.