本次主要更新是支持PC与WAP端可以展示推流网址与二维码, 可以用第三方APP或工具实现圈子推流直播。因为可以基于站外推流,所以就改为必须要配置回调网址,即使只使用圈子APP推流也同样要配置推流网址,大家可以看下面的教程进行配置
https://www.kancloud.cn/php168/x1_of_qibo/1419578
不配置的话,圈子群聊不能自动弹出播放器窗口。但是你可以把推流网址发到论坛或其它地方去。
另外有一点要提醒大家,PC与WAP推流网址生成后,不要重复生成, 不然导致之前生成的播流网址无效。后面生成的会替换上一次生成的。每次升成的网址都不一样的。大家可以对比看看。
另外,也实现了录播功能,录播的配置比较复杂,大家要有点耐心。教程如下
https://www.kancloud.cn/php168/x1_of_qibo/1419580
关于论坛如何调用圈子在线直播的信息,免费版论坛可以参考下面的代码自行修改。商业版论坛可以在后台直接升级即可
其它个性风格,也参考下面的修改
PC端的代码如下,具插入的位置,就在 {qb:listpage 这个的上一行即可
<style>
.play_voice {
display: inline-block;
height: 30px;
line-height: 40px;
text-align: center;
position: relative;
vertical-align: bottom;
}
.play_voice span {
display: inline-block;
width: 3px;
margin-bottom: 0;
background-color: blue;
margin-right: -12px;
}
.play_voice .line1 {
/*alternate意为应该轮流反向播放动画*/
animation: line 0.6s infinite ease-in-out alternate;
}
.play_voice .line2 {
animation: line 0.6s 0.2s infinite ease-in-out alternate;
}
.play_voice .line3 {
animation: line 0.6s 0.4s infinite ease-in-out alternate;
}
.play_voice .line4 {
animation: line 0.6s 0.6s infinite ease-in-out alternate;
}
@keyframs line {
from {
height: 0;
}
to {
height: 20px;
}
}
@-webkit-keyframes line {
from {
height: 0;
}
to {
height: 20px;
}
}
</style>
<div class="pc_live_video">
{qb:tag name="pc_live_video" js="pc_live_video" class="plugins\alilive\index\Index@label"}
<ul class="list">
<li class="icon"><a href="{:get_url('user',$rs.uid)}" target="_blank"><img src="{$rs.uid|get_user_icon}" onerror="this.src='__STATIC__/images/nobody.gif'"></a></li>
<li class="info">
<div class="title"><i class="fa fa-video-camera" style="font-size:16px;color:orange;"></i> <a target="_blank" href="{:murl('member/msg/index')}?uid=-{$rs.id}">{$rs.uid|get_user_name} 正在 {$rs.title} 进行视频直播</a>
</div>
<div class="more"><a href="{:get_url('user',$rs.uid)}" target="_blank">{$rs.uid|get_user_name}</a> <span><i class="fa fa-clock-o"></i>直播开始时间: {$rs.start_time|format_time=true}</span></div>
</li>
<li>
<div class="play_voice">
<span class="line1"></span>
<span class="line2"></span>
<span class="line3"></span>
<span class="line4"></span>
</div>
</li>
</ul>
{/qb:tag}
</div>WAP端插入的代码如下, 具体插入位置就是
<li onclick="ChangeShow(2,'status')">推荐</li>
</ul>找到类似这样的代码,在他下面一行插入
<style>
.play_voice {
display: inline-block;
height: 30px;
line-height: 40px;
text-align: center;
position: relative;
vertical-align: bottom;
}
.play_voice span {
display: inline-block;
width: 3px;
margin-bottom: 0;
background-color: blue;
margin-right: -12px;
}
.play_voice .line1 {
/*alternate意为应该轮流反向播放动画*/
animation: line 0.6s infinite ease-in-out alternate;
}
.play_voice .line2 {
animation: line 0.6s 0.2s infinite ease-in-out alternate;
}
.play_voice .line3 {
animation: line 0.6s 0.4s infinite ease-in-out alternate;
}
.play_voice .line4 {
animation: line 0.6s 0.6s infinite ease-in-out alternate;
}
@keyframs line {
from {
height: 0;
}
to {
height: 20px;
}
}
@-webkit-keyframes line {
from {
height: 0;
}
to {
height: 20px;
}
}
</style>
<!--直播开始-->
<ul class="ListType wap_live_video">
<!--<li><a href="#"><span>置顶</span>校园暴力事件频发,为何校园变“江湖”?</a></li>
<li><a href="#"><em>精华</em>数据告诉你,未来几年升学你要和多少人PK?</a></li>-->
{qb:tag name="wap_live_video" js="wap_live_video" class="plugins\alilive\index\Index@label"}
<li style="position: relative;"><a href="{:get_url('msg',-$rs.id)}"><i>直播</i>{$rs.uid|get_user_name} 正在 {$rs.title} 直播</a>
<div class="play_voice" style="position: absolute;right:15px;top:8px;z-index:1;">
<span class="line1"></span>
<span class="line2"></span>
<span class="line3"></span>
<span class="line4"></span>
</div>
{/qb:tag}
</li>
</ul>
<!--直播结束-->其它个性风格参考这个进行修改.其实关键点就是 class="plugins\alilive\index\Index@label" 就是一个普通的标签而已.其它都是CSS