Hi @itota ,
Given you've got a good test setup, we've already seen what the webAppURL looks like with what was presumably an URL type loaded:

From your preset shortcuts in #64 , I'd be curious if you can capture some sample variable contents for any of the other types we support:
|
{ id: 'activity', label: 'Android Activity' }, |
|
{ id: 'url', label: 'URL' }, |
|
{ id: 'manifest', label: 'Manifest' }, |
|
{ id: 'auid', label: 'Application ID' }, |
I'm hoping to do something like parseDeviceResourceURI but for this data, but I'm not exactly sure what the data looks like...
|
parseDeviceResourceURI: function (uri) { |
|
try { |
|
resourceURI = new URL(uri) |
|
if (resourceURI.protocol == 'extinput:') { |
|
let params = resourceURI.searchParams |
|
return { |
|
// Seemingly not URL.host! |
|
kind: resourceURI.pathname, |
|
port: parseInt(params.get('port')), |
|
} |
|
} else { |
|
return undefined |
|
} |
|
} catch (e) { |
|
// instanceof doesn't seem to work directly |
|
if (e.name == 'TypeError') { |
|
return undefined |
|
} else { |
|
throw e |
|
} |
|
} |
|
}, |
Hi @itota ,
Given you've got a good test setup, we've already seen what the webAppURL looks like with what was presumably an URL type loaded:

From your preset shortcuts in #64 , I'd be curious if you can capture some sample variable contents for any of the other types we support:
companion-module-sony-bravia/src/actions.js
Lines 112 to 115 in 772be29
I'm hoping to do something like parseDeviceResourceURI but for this data, but I'm not exactly sure what the data looks like...
companion-module-sony-bravia/src/api.js
Lines 145 to 166 in 772be29