id
- id of the player app,com.webos.app.mediadiscovery
for webOS 6.x,com.webos.app.photovideo
for webOS 3.x-5.x,com.webos.app.smartshare
for webOS 1.0-2.xfullPath
- url of the video filefileName
- name of the video displayed in player. Filename is remembered by the player to continue playback from exit timestamp
from a web app
webOS.service.request("luna://com.webos.applicationManager", {
method: "launch",
parameters: { "id": "com.webos.app.photovideo", "params": {"payload":[{
"fullPath":"https://media.w3.org/2010/05/sintel/trailer.mp4",
"artist":"",
"subtitle":"",
"dlnaInfo":{"flagVal":4096,"cleartextSize":"-1","contentLength":"-1","opVal":1,"protocolInfo":"http-get:*:video/x-matroska:DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000","duration":0},
"mediaType":"VIDEO",
"thumbnail":"",
"deviceType":"DMR",
"album":"",
"fileName":"trailer",
"lastPlayPosition":-1}]}},
onSuccess: function (inResponse) {
console.log("The app is launched");
},
onFailure: function (inError) {
console.log("Failed to launch the app");
console.log("[" + inError.errorCode + "]: " + inError.errorText);
return;
}
});
from shell
luna-send-pub -n 1 -f luna://com.webos.applicationManager/launch '{"id": "com.webos.app.photovideo", "params": {"payload":[{"fullPath":"https://media.w3.org/2010/05/sintel/trailer.mp4","artist":"","subtitle":"","dlnaInfo":{"flagVal":4096,"cleartextSize":"-1","contentLength":"-1","opVal":1,"protocolInfo":"http-get:*:video/x-matroska:DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000","duration":0},"mediaType":"VIDEO","thumbnail":"","deviceType":"DMR","album":"","fileName":"trailer","lastPlayPosition":-1}]}}'
# 1
luna-send -f -n 1 luna://com.webos.service.settings/setSystemSettings '{"category":"picture","settings":{"energySaving":"screen_off","energySavingModified":"true"}}'
//screen will turn back on with any remote key
# 2
luna-send -n 1 "luna://com.webos.service.tvpower/power/turnOffScreen" '{}'
luna-send -n 1 "luna://com.webos.service.tvpower/power/turnOnScreen" '{}'