@yimou6/common-ui 1.10.1 → 1.10.3
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/cdn/index.cdn.js +11 -12
- package/cdn/index.cdn.js.map +1 -1
- package/cdn/index.cdn.mjs +11 -12
- package/cdn/index.cdn.mjs.map +1 -1
- package/cdn/index.css +1 -1
- package/es/components/index.d.ts +0 -1
- package/es/components/index.mjs +0 -1
- package/es/components/index.mjs.map +1 -1
- package/es/components/live-player/src/xgPlayer.vue2.mjs +3 -3
- package/es/components/live-player/src/xgPlayer.vue2.mjs.map +1 -1
- package/es/components/tzj-player/index.d.ts +2 -0
- package/es/components/tzj-player/src/easyPlayer.vue.d.ts +4 -0
- package/es/components/tzj-player/src/easyPlayer.vue2.mjs +58 -32
- package/es/components/tzj-player/src/easyPlayer.vue2.mjs.map +1 -1
- package/es/components/tzj-player/src/tzj-player.d.ts +1 -0
- package/es/components/tzj-player/src/tzj-player.mjs +12 -1
- package/es/components/tzj-player/src/tzj-player.mjs.map +1 -1
- package/es/components/tzj-player/src/tzj-player.vue.d.ts +2 -0
- package/es/components/tzj-player/src/tzj-player.vue2.mjs +25 -6
- package/es/components/tzj-player/src/tzj-player.vue2.mjs.map +1 -1
- package/es/index.mjs +0 -1
- package/es/index.mjs.map +1 -1
- package/es/installer.mjs +1 -3
- package/es/installer.mjs.map +1 -1
- package/global.d.ts +0 -1
- package/lib/components/index.d.ts +0 -1
- package/lib/components/index.js +0 -2
- package/lib/components/index.js.map +1 -1
- package/lib/components/live-player/src/xgPlayer.vue2.js +2 -2
- package/lib/components/live-player/src/xgPlayer.vue2.js.map +1 -1
- package/lib/components/tzj-player/index.d.ts +2 -0
- package/lib/components/tzj-player/src/easyPlayer.vue.d.ts +4 -0
- package/lib/components/tzj-player/src/easyPlayer.vue2.js +57 -31
- package/lib/components/tzj-player/src/easyPlayer.vue2.js.map +1 -1
- package/lib/components/tzj-player/src/tzj-player.d.ts +1 -0
- package/lib/components/tzj-player/src/tzj-player.js +12 -0
- package/lib/components/tzj-player/src/tzj-player.js.map +1 -1
- package/lib/components/tzj-player/src/tzj-player.vue.d.ts +2 -0
- package/lib/components/tzj-player/src/tzj-player.vue2.js +23 -4
- package/lib/components/tzj-player/src/tzj-player.vue2.js.map +1 -1
- package/lib/index.js +4 -6
- package/lib/index.js.map +1 -1
- package/lib/installer.js +1 -3
- package/lib/installer.js.map +1 -1
- package/package.json +4 -5
- package/theme-default/i-tzj-player.css +1 -1
- package/theme-default/index.css +1 -1
- package/es/components/wisdom-chat/index.d.ts +0 -941
- package/es/components/wisdom-chat/index.mjs +0 -8
- package/es/components/wisdom-chat/index.mjs.map +0 -1
- package/es/components/wisdom-chat/src/wisdom-chat.d.ts +0 -82
- package/es/components/wisdom-chat/src/wisdom-chat.mjs +0 -139
- package/es/components/wisdom-chat/src/wisdom-chat.mjs.map +0 -1
- package/es/components/wisdom-chat/src/wisdom-chat.vue.d.ts +0 -941
- package/es/components/wisdom-chat/src/wisdom-chat.vue.mjs +0 -6
- package/es/components/wisdom-chat/src/wisdom-chat.vue.mjs.map +0 -1
- package/es/components/wisdom-chat/src/wisdom-chat.vue2.mjs +0 -393
- package/es/components/wisdom-chat/src/wisdom-chat.vue2.mjs.map +0 -1
- package/lib/components/wisdom-chat/index.d.ts +0 -941
- package/lib/components/wisdom-chat/index.js +0 -13
- package/lib/components/wisdom-chat/index.js.map +0 -1
- package/lib/components/wisdom-chat/src/wisdom-chat.d.ts +0 -82
- package/lib/components/wisdom-chat/src/wisdom-chat.js +0 -142
- package/lib/components/wisdom-chat/src/wisdom-chat.js.map +0 -1
- package/lib/components/wisdom-chat/src/wisdom-chat.vue.d.ts +0 -941
- package/lib/components/wisdom-chat/src/wisdom-chat.vue.js +0 -10
- package/lib/components/wisdom-chat/src/wisdom-chat.vue.js.map +0 -1
- package/lib/components/wisdom-chat/src/wisdom-chat.vue2.js +0 -397
- package/lib/components/wisdom-chat/src/wisdom-chat.vue2.js.map +0 -1
- package/theme-default/i-wisdom-chat.css +0 -1
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import { defineComponent, shallowRef, onMounted, openBlock, createElementBlock, createBlock, resolveDynamicComponent, mergeProps } from 'vue';
|
|
1
|
+
import { defineComponent, shallowRef, ref, onMounted, watch, openBlock, createElementBlock, createBlock, resolveDynamicComponent, mergeProps, createCommentVNode } from 'vue';
|
|
2
2
|
import './easyPlayer.vue.mjs';
|
|
3
|
-
import { TzjPlayerProps } from './tzj-player.mjs';
|
|
3
|
+
import { TzjPlayerProps, isSupportedProtocol } from './tzj-player.mjs';
|
|
4
4
|
import './ysPlayer.vue.mjs';
|
|
5
5
|
import _sfc_main$1 from './ysPlayer.vue2.mjs';
|
|
6
6
|
import _sfc_main$2 from './easyPlayer.vue2.mjs';
|
|
7
7
|
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
10
|
const _hoisted_1 = { class: "i-tzj-player" };
|
|
11
|
+
const _hoisted_2 = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "i-tzj-player__error"
|
|
14
|
+
};
|
|
9
15
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
16
|
...{
|
|
11
17
|
name: "ITzjPlayer"
|
|
@@ -16,9 +22,21 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
22
|
const props = __props;
|
|
17
23
|
const comp = shallowRef();
|
|
18
24
|
const compRef = shallowRef();
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
const supportedProtocol = ref(true);
|
|
26
|
+
onMounted(() => initPlayer());
|
|
27
|
+
watch(
|
|
28
|
+
() => [props.url, props.accessToken],
|
|
29
|
+
() => initPlayer()
|
|
30
|
+
);
|
|
31
|
+
function initPlayer() {
|
|
32
|
+
supportedProtocol.value = isSupportedProtocol(props.url);
|
|
33
|
+
if (supportedProtocol.value) {
|
|
34
|
+
comp.value = props.accessToken && props.accessToken.length > 32 ? _sfc_main$1 : _sfc_main$2;
|
|
35
|
+
} else {
|
|
36
|
+
comp.value = null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
__name(initPlayer, "initPlayer");
|
|
22
40
|
__expose({
|
|
23
41
|
play(options) {
|
|
24
42
|
var _a;
|
|
@@ -40,7 +58,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
58
|
null,
|
|
41
59
|
16
|
|
42
60
|
/* FULL_PROPS */
|
|
43
|
-
))
|
|
61
|
+
)),
|
|
62
|
+
!supportedProtocol.value ? (openBlock(), createElementBlock("div", _hoisted_2, "\u683C\u5F0F\u4E0D\u652F\u6301")) : createCommentVNode("v-if", true)
|
|
44
63
|
]);
|
|
45
64
|
};
|
|
46
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tzj-player.vue2.mjs","sources":["../../../../../../../packages/components/tzj-player/src/tzj-player.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { onMounted, shallowRef } from 'vue';\n import EasyPlayer from './easyPlayer.vue';\n import { TzjPlayerProps } from './tzj-player';\n import YsPlayer from './ysPlayer.vue';\n\n defineOptions({\n name: 'ITzjPlayer',\n });\n\n const props = defineProps(TzjPlayerProps);\n\n const comp = shallowRef();\n const compRef = shallowRef();\n\n onMounted(() => {\n // 当访问令牌存在时,使用萤石云播放器(YsPlayer)\n
|
|
1
|
+
{"version":3,"file":"tzj-player.vue2.mjs","sources":["../../../../../../../packages/components/tzj-player/src/tzj-player.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { onMounted, ref, shallowRef, watch } from 'vue';\n import EasyPlayer from './easyPlayer.vue';\n import { isSupportedProtocol, TzjPlayerProps } from './tzj-player';\n import YsPlayer from './ysPlayer.vue';\n\n defineOptions({\n name: 'ITzjPlayer',\n });\n\n const props = defineProps(TzjPlayerProps);\n\n const comp = shallowRef();\n const compRef = shallowRef();\n const supportedProtocol = ref(true);\n\n onMounted(() => initPlayer());\n\n watch(\n () => [props.url, props.accessToken],\n () => initPlayer(),\n );\n\n function initPlayer() {\n supportedProtocol.value = isSupportedProtocol(props.url);\n if (supportedProtocol.value) {\n // 当访问令牌存在时,使用萤石云播放器(YsPlayer)\n comp.value = props.accessToken && props.accessToken.length > 32 ? YsPlayer : EasyPlayer;\n } else {\n comp.value = null;\n }\n }\n\n defineExpose({\n play(options?: any) {\n compRef.value?.play(options);\n },\n destroy() {\n compRef.value?.destroy();\n },\n });\n</script>\n\n<template>\n <div class=\"i-tzj-player\">\n <component :is=\"comp\" ref=\"compRef\" v-bind=\"props\" />\n <div v-if=\"!supportedProtocol\" class=\"i-tzj-player__error\">格式不支持</div>\n </div>\n</template>\n"],"names":["YsPlayer","EasyPlayer"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAUE,IAAA,MAAM,KAAQ,GAAA,OAAA;AAEd,IAAA,MAAM,OAAO,UAAW,EAAA;AACxB,IAAA,MAAM,UAAU,UAAW,EAAA;AAC3B,IAAM,MAAA,iBAAA,GAAoB,IAAI,IAAI,CAAA;AAElC,IAAU,SAAA,CAAA,MAAM,YAAY,CAAA;AAE5B,IAAA,KAAA;AAAA,MACE,MAAM,CAAC,KAAM,CAAA,GAAA,EAAK,MAAM,WAAW,CAAA;AAAA,MACnC,MAAM,UAAW;AAAA,KACnB;AAEA,IAAA,SAAS,UAAa,GAAA;AACpB,MAAkB,iBAAA,CAAA,KAAA,GAAQ,mBAAoB,CAAA,KAAA,CAAM,GAAG,CAAA;AACvD,MAAA,IAAI,kBAAkB,KAAO,EAAA;AAE3B,QAAA,IAAA,CAAK,QAAQ,KAAM,CAAA,WAAA,IAAe,MAAM,WAAY,CAAA,MAAA,GAAS,KAAKA,WAAW,GAAAC,WAAA;AAAA,OACxE,MAAA;AACL,QAAA,IAAA,CAAK,KAAQ,GAAA,IAAA;AAAA;AACf;AAPO,IAAA,MAAA,CAAA,UAAA,EAAA,YAAA,CAAA;AAUT,IAAa,QAAA,CAAA;AAAA,MACX,KAAK,OAAe,EAAA;;AAClB,QAAQ,CAAA,EAAA,GAAA,OAAA,CAAA,KAAA,KAAR,mBAAe,IAAK,CAAA,OAAA,CAAA;AAAA,OACtB;AAAA,MACA,OAAU,GAAA;;AACR,QAAA,CAAA,EAAA,GAAA,OAAA,CAAQ,UAAR,IAAe,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,OAAA,EAAA;AAAA;AACjB,KACD,CAAA;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/index.mjs
CHANGED
|
@@ -28,7 +28,6 @@ export { TenantEnterpriseEmits, TenantEnterpriseProps } from './components/tenan
|
|
|
28
28
|
export { ITenantEnterprise } from './components/tenant-enterprise/index.mjs';
|
|
29
29
|
export { ITextButton, ITextButtonGroup } from './components/text-button/index.mjs';
|
|
30
30
|
export { ITzjPlayer } from './components/tzj-player/index.mjs';
|
|
31
|
-
export { IWisdomChat } from './components/wisdom-chat/index.mjs';
|
|
32
31
|
export { useBaseTable } from './hooks/useBaseTable/index.mjs';
|
|
33
32
|
export { useECharts } from './hooks/useECharts/index.mjs';
|
|
34
33
|
export { withInstall, withInstallDirectives } from './utils/install.mjs';
|
package/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/installer.mjs
CHANGED
|
@@ -20,7 +20,6 @@ import { IDialog } from './components/dialog/index.mjs';
|
|
|
20
20
|
import { ILink } from './components/link/index.mjs';
|
|
21
21
|
import { ITzjPlayer } from './components/tzj-player/index.mjs';
|
|
22
22
|
import { IDatePicker } from './components/date-picker/index.mjs';
|
|
23
|
-
import { IWisdomChat } from './components/wisdom-chat/index.mjs';
|
|
24
23
|
|
|
25
24
|
var __defProp = Object.defineProperty;
|
|
26
25
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
@@ -47,8 +46,7 @@ const component = [
|
|
|
47
46
|
IDialog,
|
|
48
47
|
ILink,
|
|
49
48
|
ITzjPlayer,
|
|
50
|
-
IDatePicker
|
|
51
|
-
IWisdomChat
|
|
49
|
+
IDatePicker
|
|
52
50
|
];
|
|
53
51
|
const install = /* @__PURE__ */ __name(function(app, _options) {
|
|
54
52
|
component.forEach((i) => app.use(i, _options));
|
package/es/installer.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installer.mjs","sources":["../../../../packages/installer.ts"],"sourcesContent":["import type { App, Plugin } from 'vue';\n\nimport {\n ICheckbox,\n IDatePicker,\n IDescriptionItem,\n IDescriptions,\n IDialog,\n IDivider,\n IDrawer,\n IForm,\n IIconSelect,\n IImageVerification,\n ILink,\n ILivePlayer,\n IPageHeader,\n IRadio,\n ISearch,\n ISegmented,\n ISelect,\n ISplitPane,\n ITable,\n ITenantEnterprise,\n ITextButton,\n ITextButtonGroup,\n ITzjPlayer,\n
|
|
1
|
+
{"version":3,"file":"installer.mjs","sources":["../../../../packages/installer.ts"],"sourcesContent":["import type { App, Plugin } from 'vue';\n\nimport {\n ICheckbox,\n IDatePicker,\n IDescriptionItem,\n IDescriptions,\n IDialog,\n IDivider,\n IDrawer,\n IForm,\n IIconSelect,\n IImageVerification,\n ILink,\n ILivePlayer,\n IPageHeader,\n IRadio,\n ISearch,\n ISegmented,\n ISelect,\n ISplitPane,\n ITable,\n ITenantEnterprise,\n ITextButton,\n ITextButtonGroup,\n ITzjPlayer,\n} from './components';\n\nconst component = [\n IForm,\n ISelect,\n IRadio,\n ICheckbox,\n IDivider,\n IDrawer,\n IIconSelect,\n IImageVerification,\n ITextButton,\n ITextButtonGroup,\n IPageHeader,\n ISearch,\n ITable,\n ISplitPane,\n ITenantEnterprise,\n ISegmented,\n IDescriptions,\n IDescriptionItem,\n ILivePlayer,\n IDialog,\n ILink,\n ITzjPlayer,\n IDatePicker,\n] as Plugin[];\n\nexport const install = function (app: App, _options?: any) {\n component.forEach(i => app.use(i, _options));\n};\n\nexport default {\n install,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,SAAY,GAAA;AAAA,EAChB,KAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,WAAA;AAAA,EACA,kBAAA;AAAA,EACA,WAAA;AAAA,EACA,gBAAA;AAAA,EACA,WAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,iBAAA;AAAA,EACA,UAAA;AAAA,EACA,aAAA;AAAA,EACA,gBAAA;AAAA,EACA,WAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA;AAEa,MAAA,OAAA,mBAAoB,MAAA,CAAA,SAAA,GAAA,EAAU,QAAgB,EAAA;AACzD,EAAA,SAAA,CAAU,QAAQ,CAAK,CAAA,KAAA,GAAA,CAAI,GAAI,CAAA,CAAA,EAAG,QAAQ,CAAC,CAAA;AAC7C,CAFuB,EAAA,SAAA;AAIvB,gBAAe;AAAA,EACb;AACF,CAAA;;;;"}
|
package/global.d.ts
CHANGED
|
@@ -24,7 +24,6 @@ declare module 'vue' {
|
|
|
24
24
|
ITenantEnterprise: typeof import('@tzj/common-ui')['ITenantEnterprise'];
|
|
25
25
|
ITextButton: typeof import('@tzj/common-ui')['ITextButton'];
|
|
26
26
|
ITzjPlayer: typeof import('@tzj/common-ui')['ITzjPlayer'];
|
|
27
|
-
IWisdomChat: typeof import('@tzj/common-ui')['IWisdomChat'];
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
29
|
|
package/lib/components/index.js
CHANGED
|
@@ -21,7 +21,6 @@ var index$h = require('./table/index.js');
|
|
|
21
21
|
var index$i = require('./tenant-enterprise/index.js');
|
|
22
22
|
var index$j = require('./text-button/index.js');
|
|
23
23
|
var index$k = require('./tzj-player/index.js');
|
|
24
|
-
var index$l = require('./wisdom-chat/index.js');
|
|
25
24
|
var form = require('./form/src/form.js');
|
|
26
25
|
var search = require('./search/src/search.js');
|
|
27
26
|
var table = require('./table/src/table.js');
|
|
@@ -52,7 +51,6 @@ exports.ITenantEnterprise = index$i.ITenantEnterprise;
|
|
|
52
51
|
exports.ITextButton = index$j.ITextButton;
|
|
53
52
|
exports.ITextButtonGroup = index$j.ITextButtonGroup;
|
|
54
53
|
exports.ITzjPlayer = index$k.ITzjPlayer;
|
|
55
|
-
exports.IWisdomChat = index$l.IWisdomChat;
|
|
56
54
|
exports.FormItemProps = form.FormItemProps;
|
|
57
55
|
exports.FormProps = form.FormProps;
|
|
58
56
|
exports.formItemExcludeKeys = form.formItemExcludeKeys;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -107,11 +107,11 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
107
107
|
playerInstance.value.play();
|
|
108
108
|
return false;
|
|
109
109
|
});
|
|
110
|
-
playerInstance.value.on(
|
|
110
|
+
playerInstance.value.on("error", (error) => {
|
|
111
111
|
console.error("\u64AD\u653E\u51FA\u9519:", error);
|
|
112
112
|
playerInstance.value.unRegisterPlugin("controls");
|
|
113
113
|
});
|
|
114
|
-
playerInstance.value.on(
|
|
114
|
+
playerInstance.value.on("canplay", () => {
|
|
115
115
|
console.log("\u89C6\u9891\u7F13\u51B2\u8DB3\u591F\u6570\u636E\uFF0C\u53EF\u4EE5\u64AD\u653E");
|
|
116
116
|
});
|
|
117
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xgPlayer.vue2.js","sources":["../../../../../../../packages/components/live-player/src/xgPlayer.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, nextTick, onMounted, ref, shallowRef } from 'vue';\n import Player
|
|
1
|
+
{"version":3,"file":"xgPlayer.vue2.js","sources":["../../../../../../../packages/components/live-player/src/xgPlayer.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, nextTick, onMounted, ref, shallowRef } from 'vue';\n import Player from 'xgplayer';\n import FlvPlugin from 'xgplayer-flv';\n import HlsPlugin from 'xgplayer-hls';\n import { videoType } from './live-player';\n import { customLang, onLineIgnores, recordIgnores } from './preset';\n\n /**\n * 西瓜播放器\n */\n defineOptions({\n name: 'XgPlayer',\n });\n\n const props = defineProps<{\n url: string;\n onLine?: boolean;\n }>();\n\n const playerRef = shallowRef<HTMLElement>();\n const playerInstance = ref<Player | null>(null);\n const videoUrl = computed(() => props.url);\n\n onMounted(() => {\n // @ts-ignore\n Player.I18N.extend([customLang]);\n play();\n });\n\n defineExpose({ play, destroy });\n\n function play() {\n destroy();\n nextTick(() => {\n console.log(videoUrl.value);\n // 视频地址为空,不播放\n if (!videoUrl.value) {\n return;\n }\n createXgPlayer();\n });\n }\n\n function destroy() {\n if (playerInstance.value) {\n playerInstance.value.destroy();\n playerInstance.value = null;\n }\n }\n\n /**\n * 检查插件支持情况\n */\n function checkPluginSupport() {\n const plugins: any[] = [];\n const type = videoType(props.url);\n\n try {\n if (type === 'flv' && FlvPlugin.isSupported()) {\n plugins.push(FlvPlugin);\n } else if (type === 'hls') {\n const videoElement = document.createElement('video');\n const isNativeHlsSupported = videoElement.canPlayType('application/vnd.apple.mpegurl');\n\n if (!isNativeHlsSupported && HlsPlugin.isSupported()) {\n plugins.push(HlsPlugin);\n }\n } else if (type !== 'flv' && type !== 'hls') {\n console.warn(`不支持的视频类型: ${type}. 请使用 'flv' 或 'hls'。`);\n }\n } catch (error) {\n console.error('检查插件支持时出错:', error);\n }\n\n return plugins;\n }\n\n /**\n * 创建播放器配置\n */\n function createPlayerConfig(plugins: any[]) {\n const ignores = props.onLine ? onLineIgnores : recordIgnores;\n\n return {\n el: playerRef.value!,\n url: props.url,\n height: '100%',\n width: '100%',\n autoplay: true,\n autoplayMuted: true,\n videoInit: true,\n plugins,\n ignores,\n marginControls: false,\n screenShot: props.onLine,\n lang: 'zh-cn',\n videoAttributes: {\n crossOrigin: 'anonymous',\n },\n };\n }\n\n /**\n * 创建西瓜播放器实例,播放hls,flv流\n */\n function createXgPlayer() {\n const plugins = checkPluginSupport();\n const config = createPlayerConfig(plugins);\n\n playerInstance.value = new Player(config);\n\n // 播放出错之后,点击\"刷新\"按钮重新播放\n playerInstance.value.getPlugin('error').useHooks('errorRetry', () => {\n playerInstance.value!.setConfig({\n url: props.url,\n });\n // 重置状态\n playerInstance.value!.resetState();\n // 重新播放\n playerInstance.value!.play();\n return false;\n });\n\n playerInstance.value.on('error', (error: Record<string, any>) => {\n console.error('播放出错:', error);\n // 播放出错时,禁用控制栏插件\n playerInstance.value!.unRegisterPlugin('controls');\n });\n\n // 视频缓冲足够数据,可以播放\n playerInstance.value.on('canplay', () => {\n console.log('视频缓冲足够数据,可以播放');\n });\n }\n</script>\n\n<template>\n <div class=\"i-player-bg i-player-container\">\n <!-- 视频地址为空的提示 -->\n <div v-if=\"!videoUrl\" class=\"i-player-no__url\">\n <div>无播放地址</div>\n </div>\n <div v-else ref=\"playerRef\" class=\"i-player-container\" />\n </div>\n</template>\n"],"names":["shallowRef","ref","computed","onMounted","customLang","nextTick","videoType","onLineIgnores","recordIgnores"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeE,IAAA,MAAM,KAAQ,GAAA,OAAA;AAKd,IAAA,MAAM,YAAYA,cAAwB,EAAA;AAC1C,IAAM,MAAA,cAAA,GAAiBC,QAAmB,IAAI,CAAA;AAC9C,IAAA,MAAM,QAAW,GAAAC,YAAA,CAAS,MAAM,KAAA,CAAM,GAAG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O,CAAE,CAAA,QAAA,CAAS,cAAc,MAAM;AACnE,QAAA,cAAA,CAAe,MAAO,SAAU,CAAA;AAAA,UAC9B,KAAK,KAAM,CAAA;AAAA,SACZ,CAAA;AAED,QAAA,cAAA,CAAe,MAAO,UAAW,EAAA;AAEjC,QAAA,cAAA,CAAe,MAAO,IAAK,EAAA;AAC3B,QAAO,OAAA,KAAA;AAAA,OACR,CAAA;AAED,MAAA,cAAA,CAAe,KAAM,CAAA,EAAA,CAAG,OAAS,EAAA,CAAC,KAA+B,KAAA;AAC/D,QAAQ,OAAA,CAAA,KAAA,CAAM,6BAAS,KAAK,CAAA;AAE5B,QAAe,cAAA,CAAA,KAAA,CAAO,iBAAiB,UAAU,CAAA;AAAA,OAClD,CAAA;AAGD,MAAe,cAAA,CAAA,KAAA,CAAM,EAAG,CAAA,SAAA,EAAW,MAAM;AACvC,QAAA,OAAA,CAAQ,IAAI,gFAAe,CAAA;AAAA,OAC5B,CAAA;AAAA;AA3BM,IAAA,MAAA,CAAA,cAAA,EAAA,gBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -20,6 +20,8 @@ export declare const ITzjPlayer: import("../../types").SFCWithInstall<import("vu
|
|
|
20
20
|
}>> & Readonly<{}> & {}>;
|
|
21
21
|
comp: import("vue").ShallowRef<any, any>;
|
|
22
22
|
compRef: import("vue").ShallowRef<any, any>;
|
|
23
|
+
supportedProtocol: import("vue").Ref<boolean, boolean>;
|
|
24
|
+
initPlayer: () => void;
|
|
23
25
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
26
|
url: {
|
|
25
27
|
type: StringConstructor;
|
|
@@ -6,9 +6,13 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
6
6
|
}>, {
|
|
7
7
|
props: any;
|
|
8
8
|
player: any;
|
|
9
|
+
id: string;
|
|
9
10
|
playerRef: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
10
11
|
playSuccess: import("vue").Ref<boolean, boolean>;
|
|
11
12
|
playUrl: import("vue").Ref<string, string>;
|
|
13
|
+
initPlayer: (url: string) => Promise<void>;
|
|
14
|
+
removePlayerDom: () => void;
|
|
15
|
+
createPlayerDom: () => void;
|
|
12
16
|
createPlayer: () => Promise<void>;
|
|
13
17
|
destroy: () => void;
|
|
14
18
|
play: (url?: string) => void;
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
+
var tzjPlayer = require('./tzj-player.js');
|
|
6
7
|
|
|
7
8
|
var __defProp = Object.defineProperty;
|
|
8
9
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
-
const _hoisted_1 = {
|
|
10
|
-
const _hoisted_2 = {
|
|
10
|
+
const _hoisted_1 = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "i-tzj-player__error"
|
|
13
13
|
};
|
|
14
|
-
const
|
|
14
|
+
const _hoisted_2 = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "i-tzj-player__error"
|
|
17
17
|
};
|
|
@@ -26,25 +26,17 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
26
26
|
setup(__props, { expose: __expose }) {
|
|
27
27
|
const props = __props;
|
|
28
28
|
let player = null;
|
|
29
|
+
const id = tzjPlayer.uuid();
|
|
29
30
|
const playerRef = vue.shallowRef();
|
|
30
31
|
const playSuccess = vue.ref(true);
|
|
31
32
|
const playUrl = vue.ref("");
|
|
32
33
|
vue.onMounted(() => {
|
|
33
|
-
|
|
34
|
-
playUrl.value = formatUrl(props.url);
|
|
35
|
-
createPlayer();
|
|
36
|
-
}
|
|
34
|
+
initPlayer(props.url || "");
|
|
37
35
|
});
|
|
38
36
|
vue.watch(
|
|
39
37
|
() => props.url,
|
|
40
38
|
(newUrl) => {
|
|
41
|
-
|
|
42
|
-
playUrl.value = formatUrl(newUrl);
|
|
43
|
-
createPlayer();
|
|
44
|
-
} else {
|
|
45
|
-
playUrl.value = "";
|
|
46
|
-
destroy();
|
|
47
|
-
}
|
|
39
|
+
initPlayer(newUrl || "");
|
|
48
40
|
}
|
|
49
41
|
);
|
|
50
42
|
vue.onBeforeUnmount(() => {
|
|
@@ -55,10 +47,42 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
55
47
|
play,
|
|
56
48
|
destroy
|
|
57
49
|
});
|
|
50
|
+
async function initPlayer(url) {
|
|
51
|
+
removePlayerDom();
|
|
52
|
+
if (url) {
|
|
53
|
+
playUrl.value = formatUrl(url);
|
|
54
|
+
if (window == null ? void 0 : window.EasyPlayerPro) {
|
|
55
|
+
createPlayer();
|
|
56
|
+
} else {
|
|
57
|
+
const timer = setInterval(() => {
|
|
58
|
+
if (window == null ? void 0 : window.EasyPlayerPro) {
|
|
59
|
+
createPlayer();
|
|
60
|
+
clearInterval(timer);
|
|
61
|
+
}
|
|
62
|
+
}, 100);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
__name(initPlayer, "initPlayer");
|
|
67
|
+
function removePlayerDom() {
|
|
68
|
+
const dom = document.getElementById(id);
|
|
69
|
+
dom && dom.remove();
|
|
70
|
+
}
|
|
71
|
+
__name(removePlayerDom, "removePlayerDom");
|
|
72
|
+
function createPlayerDom() {
|
|
73
|
+
var _a;
|
|
74
|
+
removePlayerDom();
|
|
75
|
+
const dom = document.createElement("div");
|
|
76
|
+
dom.id = id;
|
|
77
|
+
dom.style.width = "100%";
|
|
78
|
+
dom.style.height = "100%";
|
|
79
|
+
(_a = playerRef.value) == null ? void 0 : _a.appendChild(dom);
|
|
80
|
+
}
|
|
81
|
+
__name(createPlayerDom, "createPlayerDom");
|
|
58
82
|
async function createPlayer() {
|
|
59
|
-
|
|
83
|
+
createPlayerDom();
|
|
60
84
|
await vue.nextTick();
|
|
61
|
-
player = new window.EasyPlayerPro(
|
|
85
|
+
player = new window.EasyPlayerPro(document.getElementById(id), {
|
|
62
86
|
isLive: true,
|
|
63
87
|
// 是否直播
|
|
64
88
|
hasAudio: true,
|
|
@@ -91,12 +115,15 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
91
115
|
player.destroy();
|
|
92
116
|
player = null;
|
|
93
117
|
}
|
|
118
|
+
removePlayerDom();
|
|
94
119
|
}
|
|
95
120
|
__name(destroy, "destroy");
|
|
96
121
|
function play(url) {
|
|
97
122
|
if (player && (url || props.url)) {
|
|
98
123
|
playUrl.value = formatUrl(url || props.url);
|
|
99
124
|
player.play(playUrl.value);
|
|
125
|
+
} else {
|
|
126
|
+
initPlayer(url || props.url);
|
|
100
127
|
}
|
|
101
128
|
}
|
|
102
129
|
__name(play, "play");
|
|
@@ -108,21 +135,20 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
108
135
|
}
|
|
109
136
|
__name(formatUrl, "formatUrl");
|
|
110
137
|
return (_ctx, _cache) => {
|
|
111
|
-
return vue.openBlock(), vue.createElementBlock(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
]);
|
|
138
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
139
|
+
"div",
|
|
140
|
+
{
|
|
141
|
+
ref_key: "playerRef",
|
|
142
|
+
ref: playerRef,
|
|
143
|
+
class: "i-tzj-player"
|
|
144
|
+
},
|
|
145
|
+
[
|
|
146
|
+
!playSuccess.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, "\u65E0\u4FE1\u53F7")) : vue.createCommentVNode("v-if", true),
|
|
147
|
+
!playUrl.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, "\u65E0\u64AD\u653E\u5730\u5740")) : vue.createCommentVNode("v-if", true)
|
|
148
|
+
],
|
|
149
|
+
512
|
|
150
|
+
/* NEED_PATCH */
|
|
151
|
+
);
|
|
126
152
|
};
|
|
127
153
|
}
|
|
128
154
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"easyPlayer.vue2.js","sources":["../../../../../../../packages/components/tzj-player/src/easyPlayer.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { nextTick, onBeforeUnmount, onMounted, ref, shallowRef, watch } from 'vue';\n\n defineOptions({\n name: 'EasyPlayer',\n });\n\n const props = defineProps<{\n url: string;\n }>();\n\n let player: any = null;\n const playerRef = shallowRef<HTMLElement>();\n const playSuccess = ref(true);\n const playUrl = ref('');\n\n onMounted(() => {\n
|
|
1
|
+
{"version":3,"file":"easyPlayer.vue2.js","sources":["../../../../../../../packages/components/tzj-player/src/easyPlayer.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { nextTick, onBeforeUnmount, onMounted, ref, shallowRef, watch } from 'vue';\n import { uuid } from './tzj-player';\n\n defineOptions({\n name: 'EasyPlayer',\n });\n\n const props = defineProps<{\n url: string;\n }>();\n\n let player: any = null;\n const id = uuid();\n const playerRef = shallowRef<HTMLElement>();\n const playSuccess = ref(true);\n const playUrl = ref('');\n\n onMounted(() => {\n initPlayer(props.url || '');\n });\n\n watch(\n () => props.url,\n newUrl => {\n initPlayer(newUrl || '');\n },\n );\n\n onBeforeUnmount(() => {\n playUrl.value = '';\n destroy();\n });\n\n defineExpose({\n play,\n destroy,\n });\n\n async function initPlayer(url: string) {\n removePlayerDom();\n if (url) {\n playUrl.value = formatUrl(url);\n\n if (window?.EasyPlayerPro) {\n createPlayer();\n } else {\n const timer = setInterval(() => {\n if (window?.EasyPlayerPro) {\n createPlayer();\n clearInterval(timer);\n }\n }, 100);\n }\n }\n }\n\n // 移除播放器DOM\n function removePlayerDom() {\n const dom = document.getElementById(id);\n dom && dom.remove();\n }\n\n // 创建播放器DOM\n function createPlayerDom() {\n removePlayerDom();\n const dom = document.createElement('div');\n dom.id = id;\n dom.style.width = '100%';\n dom.style.height = '100%';\n playerRef.value?.appendChild(dom);\n }\n\n async function createPlayer() {\n createPlayerDom();\n await nextTick();\n player = new window.EasyPlayerPro(document.getElementById(id), {\n isLive: true, // 是否直播\n hasAudio: true, // 是否解析音频\n bufferTime: 0.2, // 缓存时长\n stretch: true, // 加视频拉伸\n MSE: false,\n WCS: false,\n WASM: true,\n debug: false,\n operateBtns: {\n performance: false,\n },\n });\n\n // 加载超时\n player.on('timeout', () => {\n playSuccess.value = false;\n destroy();\n });\n // 播放异常\n player.on('error', () => {\n playSuccess.value = false;\n destroy();\n });\n play(props.url);\n }\n\n function destroy() {\n if (player) {\n player.destroy();\n player = null;\n }\n removePlayerDom();\n }\n\n function play(url?: string) {\n if (player && (url || props.url)) {\n playUrl.value = formatUrl(url || props.url);\n player.play(playUrl.value);\n } else {\n initPlayer(url || props.url);\n }\n }\n\n /**\n * 格式化url\n * 当url为相对路径时,添加baseUrl。baseUrl为当前页面的url\n * @param url\n * @example\n * formatUrl('/test.mp4') => 'http://192.168.111.206:8080/test.mp4'\n * formatUrl('http://192.168.111.206:8080/test.mp4') => 'http://192.168.111.206:8080/test.mp4'\n */\n function formatUrl(url: string) {\n if (url.startsWith('/')) {\n return `${window.location.origin}${url}`;\n }\n return url;\n }\n</script>\n\n<template>\n <div ref=\"playerRef\" class=\"i-tzj-player\">\n <div v-if=\"!playSuccess\" class=\"i-tzj-player__error\">无信号</div>\n <div v-if=\"!playUrl\" class=\"i-tzj-player__error\">无播放地址</div>\n </div>\n</template>\n"],"names":["uuid","shallowRef","ref","onMounted","watch","onBeforeUnmount","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAQE,IAAA,MAAM,KAAQ,GAAA,OAAA;AAId,IAAA,IAAI,MAAc,GAAA,IAAA;AAClB,IAAA,MAAM,KAAKA,cAAK,EAAA;AAChB,IAAA,M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A,YAAA,EAAA,cAAA,CAAA;AA8Bf,IAAA,SAAS,OAAU,GAAA;AACjB,MAAA,IAAI,MAAQ,EAAA;AACV,QAAA,MAAA,CAAO,OAAQ,EAAA;AACf,QAAS,MAAA,GAAA,IAAA;AAAA;AAEX,MAAgB,eAAA,EAAA;AAAA;AALT,IAAA,MAAA,CAAA,OAAA,EAAA,SAAA,CAAA;AAQT,IAAA,SAAS,KAAK,GAAc,EAAA;AAC1B,MAAI,IAAA,MAAA,KAAW,GAAO,IAAA,KAAA,CAAM,GAAM,CAAA,EAAA;AAChC,QAAA,OAAA,CAAQ,KAAQ,GAAA,SAAA,CAAU,GAAO,IAAA,KAAA,CAAM,GAAG,CAAA;AAC1C,QAAO,MAAA,CAAA,IAAA,CAAK,QAAQ,KAAK,CAAA;AAAA,OACpB,MAAA;AACL,QAAW,UAAA,CAAA,GAAA,IAAO,MAAM,GAAG,CAAA;AAAA;AAC7B;AANO,IAAA,MAAA,CAAA,IAAA,EAAA,MAAA,CAAA;AAiBT,IAAA,SAAS,UAAU,GAAa,EAAA;AAC9B,MAAI,IAAA,GAAA,CAAI,UAAW,CAAA,GAAG,CAAG,EAAA;AACvB,QAAA,OAAO,CAAG,EAAA,MAAA,CAAO,QAAS,CAAA,MAAM,GAAG,GAAG,CAAA,CAAA;AAAA;AAExC,MAAO,OAAA,GAAA;AAAA;AAJA,IAAA,MAAA,CAAA,SAAA,EAAA,WAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -11,5 +11,6 @@ export declare const TzjPlayerProps: {
|
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
export declare function uuid(): string;
|
|
14
|
+
export declare function isSupportedProtocol(url: string): boolean;
|
|
14
15
|
export type TzjPlayerPropsType = ExtractPropTypes<typeof TzjPlayerProps>;
|
|
15
16
|
export type TzjPlayerInstance = InstanceType<typeof TzjPlayer>;
|
|
@@ -20,7 +20,19 @@ function uuid() {
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
__name(uuid, "uuid");
|
|
23
|
+
function isSupportedProtocol(url) {
|
|
24
|
+
if (!url || typeof url !== "string") {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
if (!url.includes("://")) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
const protocolRegex = /^(https?|wss?|ezopen):\/\/.+$/i;
|
|
31
|
+
return protocolRegex.test(url.trim());
|
|
32
|
+
}
|
|
33
|
+
__name(isSupportedProtocol, "isSupportedProtocol");
|
|
23
34
|
|
|
24
35
|
exports.TzjPlayerProps = TzjPlayerProps;
|
|
36
|
+
exports.isSupportedProtocol = isSupportedProtocol;
|
|
25
37
|
exports.uuid = uuid;
|
|
26
38
|
//# sourceMappingURL=tzj-player.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tzj-player.js","sources":["../../../../../../../packages/components/tzj-player/src/tzj-player.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue';\nimport type TzjPlayer from './tzj-player.vue';\n\nexport const TzjPlayerProps = {\n url: {\n type: String,\n default: '',\n },\n accessToken: {\n type: String,\n default: '',\n },\n};\n\nexport function uuid(): string {\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, c => {\n const r = (Math.random() * 16) | 0;\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\nexport type TzjPlayerPropsType = ExtractPropTypes<typeof TzjPlayerProps>;\nexport type TzjPlayerInstance = InstanceType<typeof TzjPlayer>;\n"],"names":[],"mappings":";;;;AAGO,MAAM,cAAiB,GAAA;AAAA,EAC5B,GAAK,EAAA;AAAA,IACH,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA;AAAA,GACX;AAAA,EACA,WAAa,EAAA;AAAA,IACX,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA;AAAA;AAEb;AAEO,SAAS,IAAe,GAAA;AAC7B,EAAO,OAAA,kCAAA,CAAmC,OAAQ,CAAA,OAAA,EAAS,CAAK,CAAA,KAAA;AAC9D,IAAA,MAAM,CAAK,GAAA,IAAA,CAAK,MAAO,EAAA,GAAI,EAAM,GAAA,CAAA;AACjC,IAAA,MAAM,CAAI,GAAA,CAAA,KAAM,GAAM,GAAA,CAAA,GAAK,IAAI,CAAO,GAAA,CAAA;AACtC,IAAO,OAAA,CAAA,CAAE,SAAS,EAAE,CAAA;AAAA,GACrB,CAAA;AACH;AANgB,MAAA,CAAA,IAAA,EAAA,MAAA,CAAA
|
|
1
|
+
{"version":3,"file":"tzj-player.js","sources":["../../../../../../../packages/components/tzj-player/src/tzj-player.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue';\nimport type TzjPlayer from './tzj-player.vue';\n\nexport const TzjPlayerProps = {\n url: {\n type: String,\n default: '',\n },\n accessToken: {\n type: String,\n default: '',\n },\n};\n\nexport function uuid(): string {\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, c => {\n const r = (Math.random() * 16) | 0;\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\n/**\n * 是否为支持的协议\n * 支持:http,https,ws,wss,ezopen(萤石云)\n * * 当URL不包含协议时(相对地址),也返回true\n */\nexport function isSupportedProtocol(url: string): boolean {\n if (!url || typeof url !== 'string') {\n return false;\n }\n\n // 如果URL不包含协议部分(相对地址),返回true\n if (!url.includes('://')) {\n return true;\n }\n\n const protocolRegex = /^(https?|wss?|ezopen):\\/\\/.+$/i;\n return protocolRegex.test(url.trim());\n}\n\nexport type TzjPlayerPropsType = ExtractPropTypes<typeof TzjPlayerProps>;\nexport type TzjPlayerInstance = InstanceType<typeof TzjPlayer>;\n"],"names":[],"mappings":";;;;AAGO,MAAM,cAAiB,GAAA;AAAA,EAC5B,GAAK,EAAA;AAAA,IACH,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA;AAAA,GACX;AAAA,EACA,WAAa,EAAA;AAAA,IACX,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA;AAAA;AAEb;AAEO,SAAS,IAAe,GAAA;AAC7B,EAAO,OAAA,kCAAA,CAAmC,OAAQ,CAAA,OAAA,EAAS,CAAK,CAAA,KAAA;AAC9D,IAAA,MAAM,CAAK,GAAA,IAAA,CAAK,MAAO,EAAA,GAAI,EAAM,GAAA,CAAA;AACjC,IAAA,MAAM,CAAI,GAAA,CAAA,KAAM,GAAM,GAAA,CAAA,GAAK,IAAI,CAAO,GAAA,CAAA;AACtC,IAAO,OAAA,CAAA,CAAE,SAAS,EAAE,CAAA;AAAA,GACrB,CAAA;AACH;AANgB,MAAA,CAAA,IAAA,EAAA,MAAA,CAAA;AAaT,SAAS,oBAAoB,GAAsB,EAAA;AACxD,EAAA,IAAI,CAAC,GAAA,IAAO,OAAO,GAAA,KAAQ,QAAU,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAIT,EAAA,IAAI,CAAC,GAAA,CAAI,QAAS,CAAA,KAAK,CAAG,EAAA;AACxB,IAAO,OAAA,IAAA;AAAA;AAGT,EAAA,MAAM,aAAgB,GAAA,gCAAA;AACtB,EAAA,OAAO,aAAc,CAAA,IAAA,CAAK,GAAI,CAAA,IAAA,EAAM,CAAA;AACtC;AAZgB,MAAA,CAAA,mBAAA,EAAA,qBAAA,CAAA;;;;;;"}
|
|
@@ -20,6 +20,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
20
20
|
}>> & Readonly<{}> & {}>;
|
|
21
21
|
comp: import("vue").ShallowRef<any, any>;
|
|
22
22
|
compRef: import("vue").ShallowRef<any, any>;
|
|
23
|
+
supportedProtocol: import("vue").Ref<boolean, boolean>;
|
|
24
|
+
initPlayer: () => void;
|
|
23
25
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
26
|
url: {
|
|
25
27
|
type: StringConstructor;
|
|
@@ -9,7 +9,13 @@ require('./ysPlayer.vue.js');
|
|
|
9
9
|
var ysPlayer_vue_vue_type_script_setup_true_lang = require('./ysPlayer.vue2.js');
|
|
10
10
|
var easyPlayer_vue_vue_type_script_setup_true_lang = require('./easyPlayer.vue2.js');
|
|
11
11
|
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
12
14
|
const _hoisted_1 = { class: "i-tzj-player" };
|
|
15
|
+
const _hoisted_2 = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "i-tzj-player__error"
|
|
18
|
+
};
|
|
13
19
|
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
14
20
|
...{
|
|
15
21
|
name: "ITzjPlayer"
|
|
@@ -20,9 +26,21 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
20
26
|
const props = __props;
|
|
21
27
|
const comp = vue.shallowRef();
|
|
22
28
|
const compRef = vue.shallowRef();
|
|
23
|
-
vue.
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
const supportedProtocol = vue.ref(true);
|
|
30
|
+
vue.onMounted(() => initPlayer());
|
|
31
|
+
vue.watch(
|
|
32
|
+
() => [props.url, props.accessToken],
|
|
33
|
+
() => initPlayer()
|
|
34
|
+
);
|
|
35
|
+
function initPlayer() {
|
|
36
|
+
supportedProtocol.value = tzjPlayer.isSupportedProtocol(props.url);
|
|
37
|
+
if (supportedProtocol.value) {
|
|
38
|
+
comp.value = props.accessToken && props.accessToken.length > 32 ? ysPlayer_vue_vue_type_script_setup_true_lang.default : easyPlayer_vue_vue_type_script_setup_true_lang.default;
|
|
39
|
+
} else {
|
|
40
|
+
comp.value = null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
__name(initPlayer, "initPlayer");
|
|
26
44
|
__expose({
|
|
27
45
|
play(options) {
|
|
28
46
|
var _a;
|
|
@@ -44,7 +62,8 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
44
62
|
null,
|
|
45
63
|
16
|
|
46
64
|
/* FULL_PROPS */
|
|
47
|
-
))
|
|
65
|
+
)),
|
|
66
|
+
!supportedProtocol.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, "\u683C\u5F0F\u4E0D\u652F\u6301")) : vue.createCommentVNode("v-if", true)
|
|
48
67
|
]);
|
|
49
68
|
};
|
|
50
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tzj-player.vue2.js","sources":["../../../../../../../packages/components/tzj-player/src/tzj-player.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { onMounted, shallowRef } from 'vue';\n import EasyPlayer from './easyPlayer.vue';\n import { TzjPlayerProps } from './tzj-player';\n import YsPlayer from './ysPlayer.vue';\n\n defineOptions({\n name: 'ITzjPlayer',\n });\n\n const props = defineProps(TzjPlayerProps);\n\n const comp = shallowRef();\n const compRef = shallowRef();\n\n onMounted(() => {\n // 当访问令牌存在时,使用萤石云播放器(YsPlayer)\n
|
|
1
|
+
{"version":3,"file":"tzj-player.vue2.js","sources":["../../../../../../../packages/components/tzj-player/src/tzj-player.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { onMounted, ref, shallowRef, watch } from 'vue';\n import EasyPlayer from './easyPlayer.vue';\n import { isSupportedProtocol, TzjPlayerProps } from './tzj-player';\n import YsPlayer from './ysPlayer.vue';\n\n defineOptions({\n name: 'ITzjPlayer',\n });\n\n const props = defineProps(TzjPlayerProps);\n\n const comp = shallowRef();\n const compRef = shallowRef();\n const supportedProtocol = ref(true);\n\n onMounted(() => initPlayer());\n\n watch(\n () => [props.url, props.accessToken],\n () => initPlayer(),\n );\n\n function initPlayer() {\n supportedProtocol.value = isSupportedProtocol(props.url);\n if (supportedProtocol.value) {\n // 当访问令牌存在时,使用萤石云播放器(YsPlayer)\n comp.value = props.accessToken && props.accessToken.length > 32 ? YsPlayer : EasyPlayer;\n } else {\n comp.value = null;\n }\n }\n\n defineExpose({\n play(options?: any) {\n compRef.value?.play(options);\n },\n destroy() {\n compRef.value?.destroy();\n },\n });\n</script>\n\n<template>\n <div class=\"i-tzj-player\">\n <component :is=\"comp\" ref=\"compRef\" v-bind=\"props\" />\n <div v-if=\"!supportedProtocol\" class=\"i-tzj-player__error\">格式不支持</div>\n </div>\n</template>\n"],"names":["shallowRef","ref","onMounted","watch","isSupportedProtocol","YsPlayer","EasyPlayer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAUE,IAAA,MAAM,KAAQ,GAAA,OAAA;AAEd,IAAA,MAAM,OAAOA,cAAW,EAAA;AACxB,IAAA,MAAM,UAAUA,cAAW,EAAA;AAC3B,IAAM,MAAA,iBAAA,GAAoBC,QAAI,IAAI,CAAA;AAElC,IAAUC,aAAA,CAAA,MAAM,YAAY,CAAA;AAE5B,IAAAC,SAAA;AAAA,MACE,MAAM,CAAC,KAAM,CAAA,GAAA,EAAK,MAAM,WAAW,CAAA;AAAA,MACnC,MAAM,UAAW;AAAA,KACnB;AAEA,IAAA,SAAS,UAAa,GAAA;AACpB,MAAkB,iBAAA,CAAA,KAAA,GAAQC,6BAAoB,CAAA,KAAA,CAAM,GAAG,CAAA;AACvD,MAAA,IAAI,kBAAkB,KAAO,EAAA;AAE3B,QAAA,IAAA,CAAK,QAAQ,KAAM,CAAA,WAAA,IAAe,MAAM,WAAY,CAAA,MAAA,GAAS,KAAKC,oDAAW,GAAAC,sDAAA;AAAA,OACxE,MAAA;AACL,QAAA,IAAA,CAAK,KAAQ,GAAA,IAAA;AAAA;AACf;AAPO,IAAA,MAAA,CAAA,UAAA,EAAA,YAAA,CAAA;AAUT,IAAa,QAAA,CAAA;AAAA,MACX,KAAK,OAAe,EAAA;;AAClB,QAAQ,CAAA,EAAA,GAAA,OAAA,CAAA,KAAA,KAAR,mBAAe,IAAK,CAAA,OAAA,CAAA;AAAA,OACtB;AAAA,MACA,OAAU,GAAA;;AACR,QAAA,CAAA,EAAA,GAAA,OAAA,CAAQ,UAAR,IAAe,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,OAAA,EAAA;AAAA;AACjB,KACD,CAAA;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/index.js
CHANGED
|
@@ -31,9 +31,8 @@ var tenantEnterprise = require('./components/tenant-enterprise/src/tenant-enterp
|
|
|
31
31
|
var index$i = require('./components/tenant-enterprise/index.js');
|
|
32
32
|
var index$j = require('./components/text-button/index.js');
|
|
33
33
|
var index$k = require('./components/tzj-player/index.js');
|
|
34
|
-
var index$l = require('./
|
|
35
|
-
var index$m = require('./hooks/
|
|
36
|
-
var index$n = require('./hooks/useECharts/index.js');
|
|
34
|
+
var index$l = require('./hooks/useBaseTable/index.js');
|
|
35
|
+
var index$m = require('./hooks/useECharts/index.js');
|
|
37
36
|
var install = require('./utils/install.js');
|
|
38
37
|
var provide = require('./utils/provide.js');
|
|
39
38
|
var util = require('./utils/util.js');
|
|
@@ -75,9 +74,8 @@ exports.ITenantEnterprise = index$i.ITenantEnterprise;
|
|
|
75
74
|
exports.ITextButton = index$j.ITextButton;
|
|
76
75
|
exports.ITextButtonGroup = index$j.ITextButtonGroup;
|
|
77
76
|
exports.ITzjPlayer = index$k.ITzjPlayer;
|
|
78
|
-
exports.
|
|
79
|
-
exports.
|
|
80
|
-
exports.useECharts = index$n.useECharts;
|
|
77
|
+
exports.useBaseTable = index$l.useBaseTable;
|
|
78
|
+
exports.useECharts = index$m.useECharts;
|
|
81
79
|
exports.withInstall = install.withInstall;
|
|
82
80
|
exports.withInstallDirectives = install.withInstallDirectives;
|
|
83
81
|
exports.DICT_STORE = provide.DICT_STORE;
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/installer.js
CHANGED
|
@@ -24,7 +24,6 @@ var index$h = require('./components/dialog/index.js');
|
|
|
24
24
|
var index$i = require('./components/link/index.js');
|
|
25
25
|
var index$j = require('./components/tzj-player/index.js');
|
|
26
26
|
var index$k = require('./components/date-picker/index.js');
|
|
27
|
-
var index$l = require('./components/wisdom-chat/index.js');
|
|
28
27
|
|
|
29
28
|
var __defProp = Object.defineProperty;
|
|
30
29
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
@@ -51,8 +50,7 @@ const component = [
|
|
|
51
50
|
index$h.IDialog,
|
|
52
51
|
index$i.ILink,
|
|
53
52
|
index$j.ITzjPlayer,
|
|
54
|
-
index$k.IDatePicker
|
|
55
|
-
index$l.IWisdomChat
|
|
53
|
+
index$k.IDatePicker
|
|
56
54
|
];
|
|
57
55
|
const install = /* @__PURE__ */ __name(function(app, _options) {
|
|
58
56
|
component.forEach((i) => app.use(i, _options));
|
package/lib/installer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installer.js","sources":["../../../../packages/installer.ts"],"sourcesContent":["import type { App, Plugin } from 'vue';\n\nimport {\n ICheckbox,\n IDatePicker,\n IDescriptionItem,\n IDescriptions,\n IDialog,\n IDivider,\n IDrawer,\n IForm,\n IIconSelect,\n IImageVerification,\n ILink,\n ILivePlayer,\n IPageHeader,\n IRadio,\n ISearch,\n ISegmented,\n ISelect,\n ISplitPane,\n ITable,\n ITenantEnterprise,\n ITextButton,\n ITextButtonGroup,\n ITzjPlayer,\n
|
|
1
|
+
{"version":3,"file":"installer.js","sources":["../../../../packages/installer.ts"],"sourcesContent":["import type { App, Plugin } from 'vue';\n\nimport {\n ICheckbox,\n IDatePicker,\n IDescriptionItem,\n IDescriptions,\n IDialog,\n IDivider,\n IDrawer,\n IForm,\n IIconSelect,\n IImageVerification,\n ILink,\n ILivePlayer,\n IPageHeader,\n IRadio,\n ISearch,\n ISegmented,\n ISelect,\n ISplitPane,\n ITable,\n ITenantEnterprise,\n ITextButton,\n ITextButtonGroup,\n ITzjPlayer,\n} from './components';\n\nconst component = [\n IForm,\n ISelect,\n IRadio,\n ICheckbox,\n IDivider,\n IDrawer,\n IIconSelect,\n IImageVerification,\n ITextButton,\n ITextButtonGroup,\n IPageHeader,\n ISearch,\n ITable,\n ISplitPane,\n ITenantEnterprise,\n ISegmented,\n IDescriptions,\n IDescriptionItem,\n ILivePlayer,\n IDialog,\n ILink,\n ITzjPlayer,\n IDatePicker,\n] as Plugin[];\n\nexport const install = function (app: App, _options?: any) {\n component.forEach(i => app.use(i, _options));\n};\n\nexport default {\n install,\n};\n"],"names":["IForm","ISelect","IRadio","ICheckbox","IDivider","IDrawer","IIconSelect","IImageVerification","ITextButton","ITextButtonGroup","IPageHeader","ISearch","ITable","ISplitPane","ITenantEnterprise","ISegmented","IDescriptions","IDescriptionItem","ILivePlayer","IDialog","ILink","ITzjPlayer","IDatePicker"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,SAAY,GAAA;AAAA,EAChBA,WAAA;AAAA,EACAC,eAAA;AAAA,EACAC,cAAA;AAAA,EACAC,iBAAA;AAAA,EACAC,gBAAA;AAAA,EACAC,eAAA;AAAA,EACAC,mBAAA;AAAA,EACAC,0BAAA;AAAA,EACAC,mBAAA;AAAA,EACAC,wBAAA;AAAA,EACAC,mBAAA;AAAA,EACAC,eAAA;AAAA,EACAC,cAAA;AAAA,EACAC,kBAAA;AAAA,EACAC,yBAAA;AAAA,EACAC,kBAAA;AAAA,EACAC,qBAAA;AAAA,EACAC,wBAAA;AAAA,EACAC,mBAAA;AAAA,EACAC,eAAA;AAAA,EACAC,aAAA;AAAA,EACAC,kBAAA;AAAA,EACAC;AACF,CAAA;AAEa,MAAA,OAAA,mBAAoB,MAAA,CAAA,SAAA,GAAA,EAAU,QAAgB,EAAA;AACzD,EAAA,SAAA,CAAU,QAAQ,CAAK,CAAA,KAAA,GAAA,CAAI,GAAI,CAAA,CAAA,EAAG,QAAQ,CAAC,CAAA;AAC7C,CAFuB,EAAA,SAAA;AAIvB,gBAAe;AAAA,EACb;AACF,CAAA;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yimou6/common-ui",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.3",
|
|
4
4
|
"description": "Vue3 Component Library",
|
|
5
|
-
"license": "MIT",
|
|
6
5
|
"author": "yimou6",
|
|
6
|
+
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"ui framework",
|
|
9
9
|
"vue"
|
|
@@ -69,12 +69,11 @@
|
|
|
69
69
|
"@arco-design/web-vue": "^2.57.0",
|
|
70
70
|
"echarts": "^5.6.0",
|
|
71
71
|
"element-plus": "2.9.9",
|
|
72
|
+
"ezuikit-js": "^8.1.10",
|
|
72
73
|
"vue": "^3.4.0",
|
|
73
74
|
"xgplayer": "^3.0.21",
|
|
74
75
|
"xgplayer-flv": "^3.0.21",
|
|
75
|
-
"xgplayer-hls": "^3.0.21"
|
|
76
|
-
"ezuikit-js": "^8.1.10",
|
|
77
|
-
"@tdesign-vue-next/chat": "^0.4.2"
|
|
76
|
+
"xgplayer-hls": "^3.0.21"
|
|
78
77
|
},
|
|
79
78
|
"dependencies": {
|
|
80
79
|
"@types/ezuikit-js": "^8.0.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.i-tzj-player{position:relative;width:100%;height:100%;overflow:hidden;background-color:#000;color:#fff;font-size:14px}.i-tzj-player .i-tzj-player-content{width:100%;height:100%}.i-tzj-player .i-tzj-player__error{display:flex;position:absolute;z-index:999;top:0;left:0;align-items:center;justify-content:center;width:100%;height:100%;background-color
|
|
1
|
+
.i-tzj-player{display:flex;position:relative;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden;background-color:#000;color:#fff;font-size:14px}.i-tzj-player .i-tzj-player-content{background-color:#000;width:100%;height:100%}.i-tzj-player .i-tzj-player__error{display:flex;position:absolute;z-index:999;top:0;left:0;align-items:center;justify-content:center;width:100%;height:100%;background-color:#000;color:#efefef;font-size:12px}
|