2
我在2011电视上运行2.5 SDK。在三星智能电视应用程序中检查网络连接
我无法使用检查发现这里的网络API的网络连接:http://www.samsungdforum.com/upload_files/files/guide/data/html/html_2/api_reference/javascript_apis/deviceapi/deviceapi_network.html
的值返回值应该是1或0,但所有我得到的是-1。
继承人我的代码:
的index.html
<object id='pluginNetwork' classid='clsid:SAMSUNG-INFOLINK-NETWORK'></object>
<object id='pluginObjectTV' classid='clsid:SAMSUNG-INFOLINK-TV'></object>
附JS:
所有的var network = document.getElementById('pluginNetwork');
var tvPlugin = document.getEelementById('pluginObjectTV');
var ProductType = tvPlugin.GetProductType();
var phyConnection = network.CheckPhysicalConnection(ProductType); //returns -1
var http = network.CheckHTTP(ProductType); //returns -1
var gateway = network.CheckGateway(ProductType); //returns -1
我的错误我正在使用电视API的GetProductType。无论如何,我会尝试你的建议。 – Petecoop 2012-08-17 15:16:25
这工作,感谢一群亲切的互联网陌生人 – Petecoop 2012-08-17 15:24:39