@@ -25448,6 +25448,7 @@ class MobilePtz {
2544825448 mobileContainer.style = `display:inline-block;width: ${this.jSPlugin.width}px;text-align:center;`;
2544925449 var mobileContainerTitle = document.createElement('div');
2545025450 mobileContainerTitle.className = "live-ptz-title";
25451+ mobileContainerTitle.id = "live-ptz-title";
2545125452 mobileContainerTitle.innerHTML = "云台控制";
2545225453 const ptzWrap = document.createElement('div');
2545325454 ptzWrap.id = "mobile-ez-ptz-item";
@@ -26134,14 +26135,6 @@ class Theme {
2613426135 if (!this.jSPlugin.Talk) {
2613526136 this.jSPlugin.Talk = new Talk(this.jSPlugin);
2613626137 }
26137- if (matchEzopenUrl(jSPlugin.url).type === 'live') {
26138- if (this.isMobile) {
26139- this.MobilePtz = new MobilePtz(jSPlugin);
26140- this.Ptz = new Ptz(jSPlugin);
26141- } else {
26142- this.Ptz = new Ptz(jSPlugin);
26143- }
26144- }
2614526138 }
2614626139 fetchThemeData(themeId) {
2614726140 const url = `${this.jSPlugin.env.domain}/jssdk/ezopen/template/getDetail?accessToken=${this.jSPlugin.accessToken}&id=${themeId}`;
@@ -26172,6 +26165,7 @@ class Theme {
2617226165 }
2617326166 changeTheme(options) {
2617426167 if(typeof options === 'string') {
26168+ this.jSPlugin.themeId = options;
2617526169 switch (this.jSPlugin.themeId) {
2617626170 case 'pcLive':
2617726171 this.themeData = pcLiveData.data;
@@ -26933,6 +26927,11 @@ class Theme {
2693326927 this.isNeedRenderFooter = lodash.findIndex(footer.btnList, (v)=>{
2693426928 return v.isrender > 0;
2693526929 }) >= 0;
26930+ ["date-switch-container-wrap","rec-type-container-wrap","mobile-rec-wrap","mobile-ez-ptz-container"].forEach((item,index)=> {
26931+ if(document.getElementById(item)) {
26932+ document.getElementById(item).parentElement.removeChild(document.getElementById(item));
26933+ }
26934+ });
2693626935 if (this.isNeedRenderHeader) {
2693726936 if (!document.getElementById(`${this.jSPlugin.id}-headControl`)) {
2693826937 const headerContainer = document.createElement('div');
@@ -27020,6 +27019,15 @@ class Theme {
2702027019 this.Rec = new Rec(this.jSPlugin);
2702127020 }
2702227021 }
27022+ var isNeedRenderPTZ = (lodash.findIndex(this.themeData.header.btnList, (v)=>{
27023+ return (v.iconId === 'pantile' && v.isrender === 1);
27024+ }) >= 0 || (this.isMobile && matchEzopenUrl(this.jSPlugin.url).type.indexOf('live') !== -1)) && !this.jSPlugin.disabledPTZ;
27025+ if (isNeedRenderPTZ) {
27026+ this.MobilePtz = new MobilePtz(this.jSPlugin);
27027+ this.Ptz = new Ptz(this.jSPlugin);
27028+ } else {
27029+ this.Ptz = new Ptz(this.jSPlugin);
27030+ }
2702327031 // 监听全屏事件触发
2702427032 const fullscreenchange = () => {
2702527033 const { expend, webExpend } = this.decoderState.state;
0 commit comments