mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
view: 2552|reply: 1
打印 prevThread nextThread

Failed to construct 'Worker': Script at 'https://61.191.27.18:9443/js/jswlib/...

[copyURL]

14

主题

25

帖子

114

积分

member

Rank: 2

积分
114
jumpTo
owner
poston 2020-6-16 16:51 | authorOnly 回帖奖励 |倒序浏览 |阅读模式
错误:
libffmpeg_265.js:1293 Uncaught DOMException: Failed to construct 'Worker': Script at 'https://61.191.27.18:9443/js/jswlib/thlib/HttpFlv/codec/libffmpeg_265.worker.js' cannot be accessed from origin 'http://localhost:8762'.
    at Object.allocateUnusedWorker (https://61.191.27.18:9443/js/jsw ... mpeg_265.js:1293:36)
    at Object.initMainThreadBlock (https://61.191.27.18:9443/js/jsw ... mpeg_265.js:1115:21)
    at https://61.191.27.18:9443/js/jsw ... mpeg_265.js:5047:38

源代码如下:




  1. <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  2. <html>
  3. <head>
  4.     <title></title>
  5. </head>
  6. <body>


  7. <input type="button" value="用test账户登录" onclick="testLogin()" />
  8. </body>
  9. </html>


  10. <script type="text/javascript" src="https://61.191.27.18:9443/js/jsw.js"></script>
  11. <script type="text/javascript">
  12.   window.onload = function () {
  13.     jSW.swInit({
  14.       url: 'https://61.191.27.18:9443', // bv_nginx.exe服务器地址
  15.       calltype: jSW.CallProtoType.AUTO, // AUTO: IE优先使用OCX, 如果希望IE仍然使用HTTP通信, 请使用jSW.CallProtoType.HTTP
  16.     });
  17.   };
  18.   window.onbeforeunload = function () {
  19.     jSW.swDeInit();
  20.   };

  21.   var session = null;
  22.   /*手动登录*/
  23.   function testLogin() {
  24.     if (session) {
  25.       delete session;
  26.     }
  27.     session = new jSW.SWSession({
  28.       server: '61.191.27.18', // 如果是jSW.CallProtoType.OCX方式,这里需要填写具体的IP
  29.       port: 9701,
  30.       onopen: function (sess) {
  31.         sess.swLogin({
  32.           user: 'test',
  33.           password: '123'
  34.         });
  35.       }
  36.     });

  37.     // 注册事件的回调函数
  38.     session.swAddCallBack('login', function (sender, event, json) {
  39.       alert(JSON.stringify(json, null, 4));
  40.     });
  41.     session.swAddCallBack('logout', sessionCallback);
  42.     session.swAddCallBack('pulist', sessionCallback);
  43.   }



  44.   </script>
copycode


本帖子中包含更多资源

pls login 才可以下载或查看,没有帐号?registerNow

x
reply

使用道具 report

6

主题

422

帖子

1662

积分

vipMem

Rank: 6Rank: 6

积分
1662
sofa
poston 2020-6-16 17:15 | authorOnly
你好,9443端口是https的,你的页面也要使用https来加载。
https://localhost:8762。
第一个问题,可以尝试下使用ip+端口的方式访问,不要用localhost。如果不行,要远程看下。
reply agree Against

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-9-29 10:16 , Processed in 0.054689 second(s), 21 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList