Hi guys.
Unfortunatly i cannot share whole project but i attach simple gui and give simple explanation.
https://www.dropbox.com/s/mpnsbut4y0wqkqj/UPnP_01.2014.zip - there's project.
var UPnP_devices - singular object
It allows to search devices and work with lists of servers and renderers.
There is variables serversListJoin and renderersListJoin that you should to change on yours.
var TContentDir - multiple objects that filed dinamic when UPnP devices get feedback from M-SEARCH request
var TAvTransport - multiple object that filed dinamic when UPnP devices get feedback from M-SEARCH request
var contentList - singular object that allows to work with current media server. There is var currentModule that assigned when you select device from list with join UPnP_devices.serversListJoin and var currentAVTransport that assigned when you select device from list UPnP_devices.renderersListJoin. Also var listJoin is join for content list.
You should change all list joins to yours if you want to integrate in your project.
Also i attach lg.js for lg tv's. Module uses xml2json script. At first you should to define your tv. In my case:
LG.LivRoom = LGTV({
host_port: 'http://192.168.1.151:8080',
pairKey: '739781',
channelListJoin: 'l100',
appsListJoin: 'l101',
textInputJoin: 's1500',
});
LG.BedRoom = LGTV({
host_port: 'http://192.168.1.150:8080', //150
pairKey: '987905', //'987905',
channelListJoin: 'l102',
appsListJoin: 'l103',
textInputJoin: 's1501',
});
Pair key you can discover by calling sendShowKeyRequest.
After every power on your tv you should sendHelloRequest and then you can control your tv. Then you can send any request from module's functions.
I would to explain more but i have to go out and won't be able until 12th may.
Sorry for absence of comments and mistakes in code - i'm still beginner in cf and javascript - from october past year.
четверг, 1 мая 2014 г., 5:04:59 UTC+4 пользователь Jarrod Bell написал: