[英]How do I get Tizen's B2B API working on the emulator? I want this for a TV
I'm just getting started with Tizen so I hope this is an easy noobie question, but it's got me stumped.我刚刚开始使用 Tizen,所以我希望这是一个简单的新手问题,但它让我感到难过。 I'm using the emulator T-samsung-5.5-x86.我正在使用模拟器 T-samsung-5.5-x86。 I'm trying to use Tizen's B2B API with this on my HTML page:我正在尝试在我的 HTML 页面上使用 Tizen 的 B2B API:
<script type="text/javascript" src="$B2BAPIS/b2bapis/b2bapis.js"></script>
<script src="$WEBAPIS/webapis/webapis.js"></script>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
And this in my code:这在我的代码中:
var speakerType = b2bapis.b2bcontrol.getSpeakerType();
When it runs it gives me this error when hovering over b2bapis:当它运行时,将鼠标悬停在 b2bapis 上时会出现此错误:
ReferenceError: b2bapis is not defined ReferenceError: b2bapis 未定义
Also, in my Console, it says: b2bapis.js - Failed to load resource.此外,在我的控制台中,它显示: b2bapis.js - 加载资源失败。
webapis works fine for me. webapis 对我来说很好用。
Just want to note here what I found.只想在这里记下我的发现。 b2bapis is working only on real smart TV not emulators. b2bapis 仅适用于真正的智能电视,不适用于模拟器。
Make sure you have added this import in your index.html确保您已将此导入添加到您的 index.html
<script type="text/javascript" src="$B2BAPIS/b2bapis/b2bapis.js"></script>
also privilege in your config.xml eg.在您的 config.xml 中也享有特权,例如。 b2bapis.b2bcontrol
importing this b2bapis.b2bcontrol
导入这个
<tizen:privilege name="http://developer.samsung.com/privilege/b2bcontrol"/>
Oh well, jeez... So the B2BAPIS apparently aren't something that are working on the emulator (at least not mine) but once I connected to a Samsung TV work just fine.哦,天哪……所以 B2BAPIS 显然不是在模拟器上运行的东西(至少不是我的),但是一旦我连接到三星电视就可以了。 Guess I just got by my first noob hurdle...猜猜我刚刚通过了我的第一个菜鸟障碍...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.