【问题标题】:Is the "Access to content" value from the Xbox One settings available through the Javascript UWP api?Xbox One 设置中的“访问内容”值是否可通过 Javascript UWP api 获得?
【发布时间】:2017-08-03 09:55:27
【问题描述】:

我们正在为 Xbox One 开发 UWP 应用程序。我们希望通过检查当前用户的内容限制来过滤应用程序中的内容。

我们希望能够通过过滤高于用户Access to content 设置(可在Settings->Account->Content restrictions->Access to content 找到)的任何内容来降低我们的应用程序的年龄分级。但是,我们在 Javascript api 中找不到任何代表此设置的属性。

是否可以从 Javascript UWP 平台检索此设置的值?

【问题讨论】:

    标签: javascript uwp xbox-one


    【解决方案1】:

    经过大量搜索和试验,我终于找到了解决方案:

    Windows.Media.ContentRestrictions.RatedContentRestrictions()
        .getBrowsePolicyAsync()
        .then(function (result) {
            /* 
             * "result" contains a ContentRestrictionsBrowsePolicy object which 
             * provides all the information I need.
             */
        });
    

    查看ContentRestrictionsBrowsePolicy 类以获取更多信息。

    【讨论】:

      猜你喜欢
      • 2016-12-11
      • 2018-04-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-18
      • 2018-03-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多