我无法让 StageWebViewBridge 加载外部资源

发布于 2024-12-03 22:30:06 字数 93 浏览 2 评论 0原文

我正在使用appfile:/。路径正确;如果我将其放在屏幕上并将其复制粘贴到资源管理器中,它将链接到图像。

我还有什么需要做的吗?

I am using appfile:/. The path is correct; if I put it on screen and copy-paste it in the explorer it links to the image.

Is there anything else I need to do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

绿光 2024-12-10 22:30:06

更新我已经更新了库,现在更容易使用了。你能测试一下吗?

我是 StageWebViewBridge 类的作者。如果您使用的是 Android,则存在一个已知问题。无论如何,我有一个可行的解决方案,我将在下周更新。

如果问题不在 Android 中,请给我发送一些代码。

UPDATED I have updated the library, now is more easy to use. Can you test it?

I am the author of the StageWebViewBridge class. There is a known problem if you are using Android. Anyway, I have a working solution I will update the next week.

If the problem is not in Android, then send me some code.

毁梦 2024-12-10 22:30:06

我也对如何访问本地打包的资产感到困惑。我按照要求将它们放入 HTML 文件夹中,当我向 StageWebViewBridge 发送信号以设置视频的 .src 属性时,我不知道该怎么做。

如果没有 StageWebViewBridge,并且完全在网站中,我可以直接通过 JavaScript 引用视频对象的文件,例如 swvRef.src = 'file.mp4';。这工作得很好。当我尝试告诉 flash 通过 StageWebViewBridge 发送调用时,它确实收到了对 StageWebView 的调用(我有 JavaScript 报告)。但是,当我尝试设置视频对象的 .src 时,我无法找出正确的路径。

文档说将所有内容放在“html”文件夹中。我就这么做了。没有引用 'html/a.mp4' 或 'a.mp4' 或 'htmlCache/a.mp4' 的 .src 使新的 javascript html5 视频类工作。

否则,桥接器可以完美地发送 AS->JS 和 JS->AS。我只是在寻找有关如何引用打包文件的信息。我想播放放在 /html 文件夹中的视频,但到目前为止我还做不到。

I am also confused on how to access locally packaged assets. I put them in the HTML folder as requested and when I send a signal to the StageWebViewBridge to set the .src attribute of a video I'm not sure how to do it.

Without StageWebViewBridge and entirely in a website I can just reference the file for a video object via JavaScript directly e.g. swvRef.src = 'file.mp4';. This works perfectly fine. When I try to tell flash to send a call via StageWebViewBridge it does receive the call to the StageWebView (I have JavaScript reporting it). However when I try to set the .src of a video object I can't figure out the correct path.

The documentation says to put all things in a 'html' folder. I did so. No reference to a .src of 'html/a.mp4' or 'a.mp4' or 'htmlCache/a.mp4' ever makes the new javascript html5 video class work.

Bridge otherwise is working perfectly sending AS->JS and JS->AS. I'm just looking for info on how to reference packaged files. I want to play a video I put in the /html folder and so far, I just can't do it.

回梦 2024-12-10 22:30:06

遇到同样的问题并使用“appfile:/”修复它

为什么需要“appfile:/作为本地html文件?

  • 如果处理的html / js / css是本地的并且资产是相对的(又名../或没有http://)你应该将它们视为“appfile:/”?

  • 如果处理的文件是远程的,您不必处理资产?

是否有使用“appfile:/”的最佳实践?

实际上 我在浏览器中调试 html/js/css 游戏,但如果我使用 appfile:/ ,它将不再起作用。

Got the same issue and fixed it with "appfile:/"

Why do you require "appfile:/ for a local html file ?

  • If the treated html/js/css is local and asset is relative (aka ../ or no http://) you should treat them as "appfile:/" ?

  • If the treated file is distant you do not have to handle assets ?

Is there a best practice to work with "appfile:/" ?

Actually I debug my html/js/css game in the browser but if I use appfile:/ it will no longer works. I will have to handle 2 behaviors.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文