Google mp3 文件的选择器 ViewId

Google Picker ViewId for mp3 files

我正在尝试让 Google 选择器让用户 select 只有 mp3 文件。我查看了 Picker 的文档,但没有看到任何关于 Mp3 文件的 ViewID 应该是什么的信息。此外,尝试显示带有 addView(google.picker.ViewId.DOCS). 的所有文件也不起作用。有人知道如何只加载 .mp3 文件或所有文件吗?谢谢!

据我测试没有 'load just the mp3 files' 但有 'load all files which includes mp3s'.

只需按照 Picker API Quickstart 代码并更改这些部分:

来自

var scope = 'https://www.googleapis.com/auth/photos'

var scope = 'https://www.googleapis.com/auth/drive';

(在 createPicker().. ) 来自

addView(google.picker.ViewId.PHOTOS).

addView(google.picker.ViewId.DOCS).

and then when the picker selector appears, you can type .mp3 and in the search box and it'll show all the mp3 files.

见下图: