1

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

我们希望能够通过过滤高于用户Access to content设置的任何内容(可在Settings->Account->Content restrictions->Access to content. 但是,我们在 Javascript api 中找不到任何代表此设置的属性。

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

4

1 回答 1

0

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

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

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

于 2017-03-14T22:00:49.830 回答