|
@@ -186,9 +186,7 @@ export function initListener(vue) {
|
|
|
let streamType = stream.streamType();
|
|
|
console.log('订阅流成功', streamType);
|
|
|
stream.show(store.state.user.user_type === 'STUDENT' ? 'live' : 'student', 'contain'); // 将流显示到id为 live 的盒子中
|
|
|
- if (streamType === 10 || streamType === 1) {
|
|
|
- vue.connection = true;
|
|
|
- }
|
|
|
+ vue.connection = true;
|
|
|
},
|
|
|
fail: function (err) {
|
|
|
console.log('订阅流失败', err);
|
|
@@ -266,9 +264,7 @@ export function initListener(vue) {
|
|
|
// 监听通知移除流事件
|
|
|
rtc.on('stream_removed', function (stream) {
|
|
|
console.log('监听通知移除流事件');
|
|
|
- if (stream.streamType() === 10 || stream.streamType() === 1) {
|
|
|
- vue.connection = false;
|
|
|
- }
|
|
|
+ vue.connection = false;
|
|
|
});
|
|
|
|
|
|
// 停止订阅流
|
|
@@ -447,6 +443,20 @@ export function playVideo() {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 获取设备列表
|
|
|
+ */
|
|
|
+export function getDevice() {
|
|
|
+ rtc.getDevice({
|
|
|
+ success: function (data) {
|
|
|
+ console.log('获取成功', data);
|
|
|
+ },
|
|
|
+ fail: function (str) {
|
|
|
+ console.log('直播关闭状态或查询直播失败', str);
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
* @description 推送桌面共享
|
|
|
*/
|
|
|
export function publishShareStream() {
|