ucservice 1.3.7 → 1.4.0
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/dist/ucservice.common.js +42 -8
- package/dist/ucservice.common.js.gz +0 -0
- package/dist/ucservice.common.js.map +1 -1
- package/dist/ucservice.css +1 -1
- package/dist/ucservice.umd.js +42 -8
- package/dist/ucservice.umd.js.gz +0 -0
- package/dist/ucservice.umd.js.map +1 -1
- package/dist/ucservice.umd.min.js +1 -1
- package/dist/ucservice.umd.min.js.gz +0 -0
- package/dist/ucservice.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/css/scooper.video.css +8 -8
- package/src/scooper.video.js +40 -7
package/dist/ucservice.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.video-main{position:absolute;top:0;left:-25px;right:-12px;bottom:-18px}.video-main-full{position:absolute;top:1px;left:1px;right:1px;bottom:1px}.video-main-full>li,.video-main>li{border:1px solid #aaa;float:left;position:relative}.video-main-full>li.loading,.video-main>li.loading{background:#000}.video-main-full>li:hover,.video-main>li:hover{border:1px solid #ffb951}.video-main-full>li.sel,.video-main>li.sel{border:1px solid #ef8601}.video-main-full.mode-1>li,.video-main.mode-1>li{width:98.5%;height:98.5%;list-style:none}.video-main-full.mode-1>li .info,.video-main.mode-1>li .info{font-size:20px;bottom:40px}.video-main.mode-4>li{width:49%;height:49%;list-style:none}.video-main.mode-4>li .info{font-size:18px;bottom:20px}.video-main.mode-6>li{width:33.33%;height:33.33%}.video-main.mode-6>li .info{font-size:14px;bottom:13px}.video-main.mode-6 .screen-1{width:66.66%;height:66.65%}.video-main.mode-6 .screen-1 .info{font-size:18px;bottom:30px}.video-main.mode-9>li{width:32.5%;height:32.5%;list-style:none}.video-main.mode-9>li .info{font-size:12px;bottom:14px}.video-main.mode-16>li{width:24.5%;height:24.5%;list-style:none}.video-main.mode-16>li .info{font-size:8px;bottom:10px}.video-box{-o-object-fit:fill;object-fit:fill;display:none;width:100%;height:100%}.stream-loading{width:200px;height:30px;line-height:30px;position:absolute;top:50%;left:50%;margin-top:-15px;margin-left:-100px;color:#fff;font-size:16px;padding-left:30px}.info{color:#fff;left:10px;width:67%}.info,.operate-btn{position:absolute;float:left;z-index:1}.operate-btn{width:24px;height:24x;right:1px;bottom:2px;cursor:pointer}.
|
|
1
|
+
.video-main{position:absolute;top:0;left:-25px;right:-12px;bottom:-18px}.video-main-full{position:absolute;top:1px;left:1px;right:1px;bottom:1px}.video-main-full>li,.video-main>li{border:1px solid #aaa;float:left;position:relative}.video-main-full>li.loading,.video-main>li.loading{background:#000}.video-main-full>li:hover,.video-main>li:hover{border:1px solid #ffb951}.video-main-full>li.sel,.video-main>li.sel{border:1px solid #ef8601}.video-main-full.mode-1>li,.video-main.mode-1>li{width:98.5%;height:98.5%;list-style:none}.video-main-full.mode-1>li .info,.video-main.mode-1>li .info{font-size:20px;bottom:40px}.video-main.mode-4>li{width:49%;height:49%;list-style:none}.video-main.mode-4>li .info{font-size:18px;bottom:20px}.video-main.mode-6>li{width:33.33%;height:33.33%}.video-main.mode-6>li .info{font-size:14px;bottom:13px}.video-main.mode-6 .screen-1{width:66.66%;height:66.65%}.video-main.mode-6 .screen-1 .info{font-size:18px;bottom:30px}.video-main.mode-9>li{width:32.5%;height:32.5%;list-style:none}.video-main.mode-9>li .info{font-size:12px;bottom:14px}.video-main.mode-16>li{width:24.5%;height:24.5%;list-style:none}.video-main.mode-16>li .info{font-size:8px;bottom:10px}.video-box{-o-object-fit:fill;object-fit:fill;display:none;width:100%;height:100%}.stream-loading{width:200px;height:30px;line-height:30px;position:absolute;top:50%;left:50%;margin-top:-15px;margin-left:-100px;color:#fff;font-size:16px;padding-left:30px}.info{color:#fff;left:10px;width:67%}.info,.operate-btn{position:absolute;float:left;z-index:1}.operate-btn{width:24px;height:24x;right:1px;bottom:2px;cursor:pointer}.send-audio-btn,.unsend-audio-btn{bottom:-8px;right:70px;width:48px;height:48px}.rotate-btn,.send-audio-btn,.unsend-audio-btn{position:absolute;border:0;float:left;background-size:100% 100%;background-color:transparent}.rotate-btn{bottom:1px;right:76px;width:28px;height:28px}.recv-audio-btn,.unrecv-audio-btn{bottom:-8px;right:30px;width:48px;height:48px}.close-btn,.recv-audio-btn,.unrecv-audio-btn{position:absolute;border:0;float:left;background-size:100% 100%;background-color:transparent}.close-btn{bottom:5px;right:5px;width:20px;height:20px}.operation{position:absolute;width:100%;height:12%;bottom:0;background:rgba(0,0,0,.3);color:#fff}.hide{display:none}
|
package/dist/ucservice.umd.js
CHANGED
|
@@ -13473,7 +13473,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
13473
13473
|
for (let k = 0; k < _li.length; k++) {
|
|
13474
13474
|
let rotateIndex = _li.eq(k).find('button[name=rotateVideo]').attr('rotate-index');
|
|
13475
13475
|
|
|
13476
|
-
if (rotateIndex != 0 && rotateIndex != 2) videoRotateSize(_li.eq(k), rotateIndex);
|
|
13476
|
+
if (rotateIndex != 0 && rotateIndex != 2) me.videoRotateSize(_li.eq(k)[0], rotateIndex);
|
|
13477
13477
|
}
|
|
13478
13478
|
},
|
|
13479
13479
|
|
|
@@ -13885,7 +13885,13 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
13885
13885
|
};
|
|
13886
13886
|
*/
|
|
13887
13887
|
_init: function ($dom, opts) {
|
|
13888
|
-
let me = this;
|
|
13888
|
+
let me = this; //保存dom元素的selector用作后续所有子集对象的定位(在多组件对讲模式下有用)
|
|
13889
|
+
|
|
13890
|
+
if ($dom.length == 0 || !me.getDomSelector($dom)) {
|
|
13891
|
+
console.error("父doom元素为空,无法进行视频初始化", $dom);
|
|
13892
|
+
return;
|
|
13893
|
+
} //配置项
|
|
13894
|
+
|
|
13889
13895
|
|
|
13890
13896
|
me._opts = {
|
|
13891
13897
|
windows: 4,
|
|
@@ -13998,18 +14004,46 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
13998
14004
|
//视频横向留白
|
|
13999
14005
|
$(video).css('width', liHeight);
|
|
14000
14006
|
$(video).css('height', 'auto');
|
|
14001
|
-
$(video).css('left', 'calc(' + liWidth + ' / 2' + ' - ' + liHeight + ' / 2)');
|
|
14002
|
-
$(video).css('top', 'calc(-' + liHeight / 2 + ' / ' + vWidth + ' * ' + vHeight + ' + ' + liHeight + ' / 2)');
|
|
14007
|
+
$(video).css('left', 'calc(' + liWidth + 'px / 2' + ' - ' + liHeight + 'px / 2)');
|
|
14008
|
+
$(video).css('top', 'calc(-' + liHeight / 2 + ' / ' + vWidth + ' * ' + vHeight + 'px + ' + liHeight + 'px / 2)');
|
|
14003
14009
|
} else {
|
|
14004
14010
|
//视频纵向留白
|
|
14005
14011
|
$(video).css('height', liWidth);
|
|
14006
14012
|
$(video).css('width', 'auto');
|
|
14007
|
-
$(video).css('left', 'calc(' + liHeight + ' / 2' + ' - ' + liWidth + ' / 2)');
|
|
14008
|
-
$(video).css('top', 'calc(-' + liWidth / 2 + ' / ' + vHeight + ' * ' + vWidth + ' + ' + liWidth + ' / 2)');
|
|
14013
|
+
$(video).css('left', 'calc(' + liHeight + 'px / 2' + ' - ' + liWidth + 'px / 2)');
|
|
14014
|
+
$(video).css('top', 'calc(-' + liWidth / 2 + ' / ' + vHeight + ' * ' + vWidth + 'px + ' + liWidth + 'px / 2)');
|
|
14009
14015
|
}
|
|
14010
14016
|
}
|
|
14011
14017
|
},
|
|
14012
14018
|
|
|
14019
|
+
/**
|
|
14020
|
+
* 获取父窗口传入dom的唯一selector(针对jquery高版本dom对象没有selector属性的问题)
|
|
14021
|
+
* @param $dom
|
|
14022
|
+
* @return {boolean}
|
|
14023
|
+
*/
|
|
14024
|
+
getDomSelector: function ($dom) {
|
|
14025
|
+
var me = this;
|
|
14026
|
+
|
|
14027
|
+
if ($dom.selector) {
|
|
14028
|
+
me.selector = $dom.selector;
|
|
14029
|
+
} else {
|
|
14030
|
+
if ($dom.attr("id")) {
|
|
14031
|
+
me.selector = "#" + $dom.attr("id");
|
|
14032
|
+
} else {
|
|
14033
|
+
if (!$dom.attr("class")) return false;
|
|
14034
|
+
var classNames = $dom.attr("class").split(/\s+/);
|
|
14035
|
+
$.each(classNames, function (i, className) {
|
|
14036
|
+
if ($("." + className).length == 1) {
|
|
14037
|
+
me.selector = "." + className;
|
|
14038
|
+
return true;
|
|
14039
|
+
}
|
|
14040
|
+
});
|
|
14041
|
+
}
|
|
14042
|
+
}
|
|
14043
|
+
|
|
14044
|
+
if (!me.selector) return false;else return true;
|
|
14045
|
+
},
|
|
14046
|
+
|
|
14013
14047
|
/**
|
|
14014
14048
|
* 初始化按钮点击事件
|
|
14015
14049
|
*/
|
|
@@ -14065,7 +14099,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
14065
14099
|
rotateIndex++;
|
|
14066
14100
|
$(this).attr("rotate-index", rotateIndex % 4);
|
|
14067
14101
|
let li = $(this).parent().parent()[0];
|
|
14068
|
-
videoRotateSize(li, rotateIndex);
|
|
14102
|
+
me.videoRotateSize(li, rotateIndex);
|
|
14069
14103
|
}); //接收音频事件
|
|
14070
14104
|
|
|
14071
14105
|
videoFlagObj.find("button[name='recvAudio']").click(function () {
|
|
@@ -14300,7 +14334,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
14300
14334
|
let index = me._opts.windowsBeginIndex + 1;
|
|
14301
14335
|
|
|
14302
14336
|
for (let i = index; i < index + me._opts.windowsNum; i++) {
|
|
14303
|
-
videoHtml += '<li class="screen-' + i + '" index="' + (i - 1) + '"><video class="video-box" id="video-' + i + '" autoplay ></video>' + '<div class="info hide" id="info-' + i + '"></div>' + '<div class="operate-btn">'; //videoHtml +='<button type="button" class="unlock-video-btn hide" name="lockVideo"></button>';
|
|
14337
|
+
videoHtml += '<li class="screen-' + i + '" index="' + (i - 1) + '" draggable="true"><video class="video-box" id="video-' + i + '" autoplay ></video>' + '<div class="info hide" id="info-' + i + '"></div>' + '<div class="operate-btn">'; //videoHtml +='<button type="button" class="unlock-video-btn hide" name="lockVideo"></button>';
|
|
14304
14338
|
|
|
14305
14339
|
checkUserMediaAvailable() && (videoHtml += '<button type="button" class="rotate-btn hide" name="rotateVideo" rotate-index="0"></button><button type="button" class="unsend-audio-btn hide" name="sendAudio"></button>');
|
|
14306
14340
|
videoHtml += '<button type="button" class="unrecv-audio-btn hide" name="recvAudio"></button>' + '<button type="button" class="close-btn hide" name="closeVideo"></button>' + '</div>' + '</li>';
|
package/dist/ucservice.umd.js.gz
CHANGED
|
Binary file
|