|
错误:
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
源代码如下:
- <%@ page contentType="text/html;charset=UTF-8" language="java" %>
- <html>
- <head>
- <title></title>
- </head>
- <body>
- <input type="button" value="用test账户登录" onclick="testLogin()" />
- </body>
- </html>
- <script type="text/javascript" src="https://61.191.27.18:9443/js/jsw.js"></script>
- <script type="text/javascript">
- window.onload = function () {
- jSW.swInit({
- url: 'https://61.191.27.18:9443', // bv_nginx.exe服务器地址
- calltype: jSW.CallProtoType.AUTO, // AUTO: IE优先使用OCX, 如果希望IE仍然使用HTTP通信, 请使用jSW.CallProtoType.HTTP
- });
- };
- window.onbeforeunload = function () {
- jSW.swDeInit();
- };
- var session = null;
- /*手动登录*/
- function testLogin() {
- if (session) {
- delete session;
- }
- session = new jSW.SWSession({
- server: '61.191.27.18', // 如果是jSW.CallProtoType.OCX方式,这里需要填写具体的IP
- port: 9701,
- onopen: function (sess) {
- sess.swLogin({
- user: 'test',
- password: '123'
- });
- }
- });
- // 注册事件的回调函数
- session.swAddCallBack('login', function (sender, event, json) {
- alert(JSON.stringify(json, null, 4));
- });
- session.swAddCallBack('logout', sessionCallback);
- session.swAddCallBack('pulist', sessionCallback);
- }
- </script>
copycode
|
|