### 最簡單的直播推流代碼 文件名為index.nvue
~~~
<template>
<view>
<live-pusher id="livePusher" :url="url" mode="FHD"></live-pusher>
<button @click="startLive">開始推流(開始直播)</button>
<button @click="stopLive">結束推流</button>
</view>
</template>
<script>
export default {
data() {
return {
url: 'rtmp://39.100.248.116/live',
enableCamera: false,
context: null
};
},
onReady() {
this.context = uni.createLivePusherContext('livePusher', this);
},
methods: {
EnableCamera() {
this.enableCamera = true;
},
startLive() {
this.context.start({
success: a => {
console.log('livePusher.start:' + JSON.stringify(a));
}
});
},
stopLive() {
this.context.stop({
success: a => {
console.log(JSON.stringify(a));
}
});
}
}
};
</script>
~~~
- php ping 地址
- python調用php腳本和sh調用php腳本
- php隨機字符串
- redis操作
- 公共頁面文件
- 登錄
- 文章
- 文章管理
- 文章分類
- 圖片
- 圖片分類
- 圖片管理
- 配置文件
- ueditor配置遠程上傳
- django
- 安裝
- jinja2模板標簽
- 虛擬機
- centos寶塔面板安裝
- mysql主從搭建
- 虛擬機安裝centos7
- 2
- 主從復制
- uni-app
- 更新
- 直播簡單代碼
- 搞笑的注釋代碼
- jwt
- centos以太坊環境搭建
- thinkphp5.1下的redis使用
- redis的安裝
- tp5.1中使用
- tp5.1下載酷狗音樂
- 跨域
- tp5.1導出數據庫到excel
- 鉤子和行為
- 支付寶
- 申請支付寶app接入
- 視頻播放
- 模塊安裝
- 推流配置
- pc端網頁代碼
- srs
- 后臺布局
- 基礎布局文件
- 左邊
- 頭部
- css特效代碼
- 圖片旋轉
- 圖片放大
- 頂部
- 列表頁
- 更新數據表單頁
- 模型獲取器
- 上傳圖片
- mysql
- 一些常用
- 遠程授權
- 數據庫常用命令
- 忘記密碼
- webpack
- 一些亂七八糟的東西
- linux后臺運行腳本過大處理辦法
- sublime插件
- linux svn安裝
- 工具
- 查看進程
- 獲取微信公眾號文章
- 爬取微信公眾號文章
- 清空nohup
- 服務器上跨域配置
- sql語句生成orm模型寫法的工具
- centos換阿里源
- linux一些日志操作
- zsh