ucservice 1.3.7 → 1.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ucservice",
3
3
  "private": false,
4
- "version": "1.3.7",
4
+ "version": "1.3.8",
5
5
  "description": "统一通信服务",
6
6
  "main": "dist/ucservice.common.js",
7
7
  "style": "ucservice.css",
@@ -151,15 +151,15 @@
151
151
  }
152
152
  .rotate-btn {
153
153
  position: absolute;
154
- bottom: -8px;
155
- right: 70px;
154
+ bottom: 1px;
155
+ right: 76px;
156
156
  border: 0;
157
- width: 48px;
158
- height: 48px;
159
- float: left;
160
- /* background-image: url("~@/img/yy_gb.png"); */
161
- background-size: 100% 100%;
162
- background-color: rgba(0,0,0,0);
157
+ width: 28px;
158
+ height: 28px;
159
+ float: left;
160
+ /* background-image: url("~@/img/yy_gb.png"); */
161
+ background-size: 100% 100%;
162
+ background-color: rgba(0,0,0,0);
163
163
  }
164
164
  .recv-audio-btn {
165
165
  position: absolute;
@@ -2013,6 +2013,11 @@
2013
2013
  */
2014
2014
  _init: function($dom,opts){
2015
2015
  let me = this;
2016
+ //保存dom元素的selector用作后续所有子集对象的定位(在多组件对讲模式下有用)
2017
+ if($dom.length == 0 || !me.getDomSelector($dom)) {
2018
+ console.error("父doom元素为空,无法进行视频初始化", $dom);
2019
+ return ;
2020
+ }
2016
2021
  //配置项
2017
2022
  me._opts = {
2018
2023
  windows: 4,
@@ -2115,6 +2120,34 @@
2115
2120
  }
2116
2121
  }
2117
2122
  },
2123
+ /**
2124
+ * 获取父窗口传入dom的唯一selector(针对jquery高版本dom对象没有selector属性的问题)
2125
+ * @param $dom
2126
+ * @return {boolean}
2127
+ */
2128
+ getDomSelector: function($dom) {
2129
+ var me = this;
2130
+ if($dom.selector) {
2131
+ me.selector = $dom.selector;
2132
+ }
2133
+ else {
2134
+ if($dom.attr("id")) {
2135
+ me.selector = "#" + $dom.attr("id");
2136
+ }
2137
+ else {
2138
+ if(!$dom.attr("class")) return false;
2139
+ var classNames = $dom.attr("class").split(/\s+/);
2140
+ $.each(classNames, function (i, className) {
2141
+ if ($("." + className).length == 1) {
2142
+ me.selector = "." + className;
2143
+ return true;
2144
+ }
2145
+ });
2146
+ }
2147
+ }
2148
+ if(!me.selector) return false;
2149
+ else return true;
2150
+ },
2118
2151
 
2119
2152
  /**
2120
2153
  * 初始化按钮点击事件