@shijiu/jsview 2.0.1021 → 2.0.1045-next-vue.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.
@@ -1 +1 @@
1
- /* eslint-disable */ void 0===window.Forge?(window.Forge={},console.log("Define forge browser")):console.log("Define using JsView forge engine-js");var e=window.Forge;class t{constructor(e,t){if(!e)return;if(!0===e.startsWith("url")){let t=e.indexOf("(")+1,i=e.lastIndexOf(")");if("undefined"===(e=e.substring(t,i).trim())||"null"===e||0===e.length)return}if(!0===e.startsWith("data:"))return void(this.href=e);let i=e.indexOf("://");if(!(i<0||i>10)||e.startsWith("./")||e.startsWith("/")||(e="./"+e),!0===e.startsWith("/"))e=document.location.origin+e;else if(!0===e.startsWith("./")&&void 0!==window.JsView&&void 0!==window.JsView.Dom.JsSubPath){if(void 0===window.JsView.Dom.MainPath||"undefined"===window.JsView.Dom.MainPathRef||window.JsView.Dom.MainPathRef!==document.location.href){window.JsView.Dom.JsSubPath.startsWith("/")||(window.JsView.Dom.JsSubPath="/"+window.JsView.Dom.JsSubPath),window.JsView.Dom.JsSubPath.endsWith("/")||(window.JsView.Dom.JsSubPath=window.JsView.Dom.JsSubPath+"/"),window.JsView.Dom.MainPathRef=document.location.href;let e=document.location.pathname.lastIndexOf(window.JsView.Dom.JsSubPath);window.JsView.Dom.MainPath=document.location.origin+document.location.pathname.substring(0,e)}e=window.JsView.Dom.MainPath+e.substring(1)}if(this.href=e,!t)return;let o=this.href,n=o.indexOf("#");n>0&&(this.hash=o.substring(n),o=o.substring(0,n));let r=o.indexOf("?");r>1&&(this.search=o.substring(r),o=o.substring(0,r));let s=o,a=s.indexOf("://");this.protocol=a>0?s.substring(0,a+1):"";let d=a>1?s.substring(a+3):"";a=d.indexOf("/"),this.host=a>0?d.substring(0,a):"",this.pathname=a>=1?d.substring(a):"",this.origin=this.protocol+"//"+this.host,a=this.host.indexOf(":"),this.hostname=a>0?this.host.substring(0,a):this.host,this.port=a>1?this.host.substring(a+1):""}replace(e){this.href=e}href="";origin="";protocol="";host="";hostname="";port="";pathname="";search="";hash=""}class i{static SetBackgroundColor(t,i,o){const n=window.JsvCode.ForgeHandles.TextureManager.GetColorTextureCached(i);let r;o&&(r=new e.ViewRoundCornerMask(o.topLeft,o.topRight,o.bottomLeft,o.bottomRight));const s=new e.ExternalTextureSetting(n,r);t.ResetTexture(s)}static SetBackgroundImage(i,o,n,r,s,a,d){let l,g={};if("string"==typeof o){const e=new t(o);if(e instanceof t==!1)throw Error("Bad Argument.",e);g.url=e.href}else"linear-gradient"==o?.type&&(g.gradient=o);if(g.gradient)if(g.gradient.colors?.length>2){const e=g.gradient.colors,t=[e[0],e[e.length-1]],i=e.slice(1,e.length-1);l=window.JsvCode.ForgeHandles.TextureManager.CreateLinearGradientTexture(t,i)}else 2==g.gradient.colors?.length?l=window.JsvCode.ForgeHandles.TextureManager.CreateMiniGradientTexture(!0,g.gradient.colors[0],g.gradient.colors[1],g.gradient.rawValue):console.warn("Failed to create backgroundImage gradient, bad colors.",g.gradient.colors);else g.url&&(l=g.url.includes(".gif")||g.url.includes(".webp")?window.JsvCode.ForgeHandles.TextureManager.GetGifImage(g.url,!1,null,d):window.JsvCode.ForgeHandles.TextureManager.GetImage2(g.url,!1,s,a||e.ColorSpace.RGBA_8888));if(l){let t;n&&(t=new e.ViewRoundCornerMask(n.topLeft,n.topRight,n.bottomLeft,n.bottomRight));const o=new e.ExternalTextureSetting(l,t);if(i.ResetTexture(o),r){let e=l.RegisterLoadImageCallback(null,(function(){r({width:l.Width,height:l.Height})}));i.RegisterDetachCallback((()=>{l.UnregisterLoadImageCallback(e)}))}}}static SetMaskedBackgroundImage(i,o,n,r){if("string"==typeof o&&(o=new t(o)),o instanceof t==!1)throw Error("Bad Argument.",o);if("string"==typeof n&&(n=new t(n)),n instanceof t==!1)throw Error("Bad Argument(MaskURL).",n);const s=window.JsvCode.ForgeHandles.TextureManager.GetImage2(o.href,!1,null,r||e.ColorSpace.RGBA_8888);if(s){const t=window.JsvCode.ForgeHandles.TextureManager.GetImage2(n.href,!1,null,e.ColorSpace.RGBA_8888),o=new e.ExternalTextureSetting(s,new e.ViewTextureMask(t));i.ResetTexture(o)}}}export{e as Forge,i as ForgeExtension};
1
+ /* eslint-disable */ void 0===window.Forge?(window.Forge={},console.log("Define forge browser")):console.log("Define using JsView forge engine-js");var e=window.Forge;class t{constructor(e,t){if(!e)return;if(!0===e.startsWith("url")){let t=e.indexOf("(")+1,i=e.lastIndexOf(")");if("undefined"===(e=e.substring(t,i).trim())||"null"===e||0===e.length)return}if(!0===e.startsWith("data:"))return void(this.href=e);let i=e.indexOf("://");if(!(i<0||i>10)||e.startsWith("./")||e.startsWith("/")||(e="./"+e),!0===e.startsWith("/"))e=document.location.origin+e;else if(!0===e.startsWith("./")&&void 0!==window.JsView&&void 0!==window.JsView.Dom.JsSubPath){if(void 0===window.JsView.Dom.MainPath||"undefined"===window.JsView.Dom.MainPathRef||window.JsView.Dom.MainPathRef!==document.location.href){window.JsView.Dom.JsSubPath.startsWith("/")||(window.JsView.Dom.JsSubPath="/"+window.JsView.Dom.JsSubPath),window.JsView.Dom.JsSubPath.endsWith("/")||(window.JsView.Dom.JsSubPath=window.JsView.Dom.JsSubPath+"/"),window.JsView.Dom.MainPathRef=document.location.href;let e=document.location.pathname.lastIndexOf(window.JsView.Dom.JsSubPath);window.JsView.Dom.MainPath=document.location.origin+document.location.pathname.substring(0,e)}e=window.JsView.Dom.MainPath+e.substring(1)}if(this.href=e,!t)return;let o=this.href,n=o.indexOf("#");n>0&&(this.hash=o.substring(n),o=o.substring(0,n));let s=o.indexOf("?");s>1&&(this.search=o.substring(s),o=o.substring(0,s));let r=o,a=r.indexOf("://");this.protocol=a>0?r.substring(0,a+1):"";let d=a>1?r.substring(a+3):"";a=d.indexOf("/"),this.host=a>0?d.substring(0,a):"",this.pathname=a>=1?d.substring(a):"","file:"==this.protocol&&(this.host="",this.pathname=d),this.origin=this.protocol+"//"+this.host,a=this.host.indexOf(":"),this.hostname=a>0?this.host.substring(0,a):this.host,this.port=a>1?this.host.substring(a+1):""}replace(e){this.href=e}href="";origin="";protocol="";host="";hostname="";port="";pathname="";search="";hash=""}class i{static SetBackgroundColor(t,i,o){const n=window.JsvCode.ForgeHandles.TextureManager.GetColorTextureCached(i);let s;o&&(s=new e.ViewRoundCornerMask(o.topLeft,o.topRight,o.bottomLeft,o.bottomRight));const r=new e.ExternalTextureSetting(n,s);t.ResetTexture(r)}static SetBackgroundImage(i,o,n,s,r,a,d){let h,l={};if("string"==typeof o){const e=new t(o);if(e instanceof t==!1)throw Error("Bad Argument.",e);l.url=e.href}else"linear-gradient"==o?.type&&(l.gradient=o);if(l.gradient)if(l.gradient.colors?.length>2){const e=l.gradient.colors,t=[e[0],e[e.length-1]],i=e.slice(1,e.length-1);h=window.JsvCode.ForgeHandles.TextureManager.CreateLinearGradientTexture(t,i)}else 2==l.gradient.colors?.length?h=window.JsvCode.ForgeHandles.TextureManager.CreateMiniGradientTexture(!0,l.gradient.colors[0],l.gradient.colors[1],l.gradient.rawValue):console.warn("Failed to create backgroundImage gradient, bad colors.",l.gradient.colors);else l.url&&(h=l.url.includes(".gif")||l.url.includes(".webp")?window.JsvCode.ForgeHandles.TextureManager.GetGifImage(l.url,!1,null,d):window.JsvCode.ForgeHandles.TextureManager.GetImage2(l.url,!1,r,a||e.ColorSpace.RGBA_8888));if(h){let t;n&&(t=new e.ViewRoundCornerMask(n.topLeft,n.topRight,n.bottomLeft,n.bottomRight));const o=new e.ExternalTextureSetting(h,t);if(i.ResetTexture(o),s){let e=h.RegisterLoadImageCallback(null,(function(){s({width:h.Width,height:h.Height})}));i.RegisterDetachCallback((()=>{h.UnregisterLoadImageCallback(e)}))}}}static SetMaskedBackgroundImage(i,o,n,s){if("string"==typeof o&&(o=new t(o)),o instanceof t==!1)throw Error("Bad Argument.",o);if("string"==typeof n&&(n=new t(n)),n instanceof t==!1)throw Error("Bad Argument(MaskURL).",n);const r=window.JsvCode.ForgeHandles.TextureManager.GetImage2(o.href,!1,null,s||e.ColorSpace.RGBA_8888);if(r){const t=window.JsvCode.ForgeHandles.TextureManager.GetImage2(n.href,!1,null,e.ColorSpace.RGBA_8888),o=new e.ExternalTextureSetting(r,new e.ViewTextureMask(t));i.ResetTexture(o)}}}export{e as Forge,i as ForgeExtension};
@@ -3,11 +3,11 @@
3
3
  */
4
4
 
5
5
  const TargetRevision = {
6
- "CoreRevision": 1021336,
7
- "CoreRevisionAndBranch": "1021336",
8
- "JseRevision": "1.0.882",
6
+ "CoreRevision": 1021348,
7
+ "CoreRevisionAndBranch": "1021348",
8
+ "JseRevision": "1.0.884",
9
9
  "JseUrl":
10
- "http://cdn.release.qcast.cn/forge_js/master/JsViewES6_js2c_r882.jsv.1f7c4fd1.js"
10
+ "http://cdn.release.qcast.cn/forge_js/master/JsViewES6_js2c_r884.jsv.e3645d6b.js"
11
11
  };
12
12
 
13
13
  // 版本是否存在测试方法
@@ -147,16 +147,6 @@ export default class JsViewLoader {
147
147
  console.error("JsView Error: Load designed map failed");
148
148
  }
149
149
 
150
- // 设置播放器的屏幕坐标尺寸
151
- if (window.JsView) {
152
- window.JsView.setVideoDesignMapWidth?.(designMap.width);
153
- } else {
154
- // 借助Audio标签设置基类BaseMedia的屏幕尺寸配置,绕开react的unref语法检测
155
- if (Audio.setDesignMapWidth) {
156
- Audio.setDesignMapWidth(designMap.width);
157
- }
158
- }
159
-
160
150
  return designMap;
161
151
  }
162
152
 
@@ -1,10 +1,10 @@
1
- import AppData from '/src/appConfig/app.config.mjs'
2
- import JsViewVendorConfig from "/src/appConfig/jsview.config.mjs"
3
-
4
1
  async function main() {
2
+ const { default: appConfig } = await import("/src/appConfig/app.config.mjs");
3
+ const { default: jsviewVendorConfig } = await import("/src/appConfig/jsview.config.mjs");
4
+
5
5
  let JsViewLoader = null;
6
6
  // 根据JsViewConfig, 判断厂商是否设置了使用远程loader启动
7
- const remoteLoader = JsViewVendorConfig.jsviewConfig.remoteLoader;
7
+ const remoteLoader = jsviewVendorConfig.jsviewConfig.remoteLoader;
8
8
  if (remoteLoader) {
9
9
  JsViewLoader = (await import(remoteLoader)).default;
10
10
  } else {
@@ -13,7 +13,7 @@ async function main() {
13
13
  const jsviewLoader = new JsViewLoader();
14
14
 
15
15
  // 使用vendor配置值覆盖默认配置。
16
- const config = jsviewLoader.mergeConfig(JsViewVendorConfig);
16
+ const config = jsviewLoader.mergeConfig(jsviewVendorConfig);
17
17
  console.log("JsView config: " + JSON.stringify(config));
18
18
 
19
19
  jsviewLoader.initForgeEnv();
@@ -23,7 +23,7 @@ async function main() {
23
23
  // JsView环境加载完毕后,加载vue/react的main.js文件。
24
24
  import('/src/main.tsx');
25
25
  };
26
- jsviewLoader.initJsViewEnv(AppData.AppName, onInitJsViewEnv);
26
+ jsviewLoader.initJsViewEnv(appConfig.AppName, onInitJsViewEnv);
27
27
  }
28
28
 
29
29
  // webpack/vite运行入口
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shijiu/jsview",
3
- "version": "2.0.1021",
3
+ "version": "2.0.1045-next-vue.0",
4
4
  "bin": {
5
5
  "jsview-post-build": "./tools/jsview-post-build.js",
6
6
  "jsview-post-install": "./tools/jsview-post-install.js"