【问题标题】:Luna Service for media in LG webOS 3.0 TV AppLG webOS 3.0 TV App 中的媒体 Luna 服务
【发布时间】:2018-10-23 18:31:13
【问题描述】:

需要知道以下服务的作用。

luna://com.webos.media 服务(注意:Luna 服务文档中没有提供)

我正在寻找频道的字幕/音频中的语言更改。请指导我完成此操作。

请参考以下示例。

 webOS.service.request("luna://com.webos.media", {
    method:"selectTrack",
    parameters: { "type": "audio", "index": index, "mediaId": mediaId },
      onSuccess: function (result) {
        console.log("[succes] select audio track " + index);
      },
      onFailure: function (result) {
        console.log( "[fail][" + result.errorCode + "] " + result.errorText );
        }
 });

请提及此 API 的其他可用方法。

【问题讨论】:

  • 这是合作伙伴级别的 API 调用。如果您被允许使用它,您应该咨询您在 LG 的联系人。

标签: javascript media webos lg


【解决方案1】:

我们已成功使用此方法在 LG WebOS 设备上切换字幕和音轨。

您可以参考此链接进行改进: https://github.com/webosose/umediaserver/blob/master/src/server/uMediaserver.cpp

/**
@page com_webos_media com.webos.media
@{
@section com_webos_media_selectTrack selectTrack
Selects Track
@par Parameters
Name | Required | Type | Description
-----|--------|------|----------
mediaId  | yes | String  | media id assigned to this media.
type     | yes | String  | track type: video, audio and subtitle.
index    | yes | Integer  | track index to select.
@par Returns(Call)
Name | Required | Type | Description
-----|--------|------|----------
returnValue | yes | Boolean | true if successful, false otherwise.
errorCode   | no  | Integer | errorCode only if returnValue is false.
errorText   | no  | String  | errorText only if returnValue is false.
mediaId     | yes | String  | media id assigned to this media.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-07-15
    • 1970-01-01
    • 2022-12-11
    • 2022-06-28
    • 1970-01-01
    • 1970-01-01
    • 2020-10-23
    相关资源
    最近更新 更多