File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -1029,17 +1029,30 @@ You are prompted to select the device used to play media. Once the device is sel
1029
1029
1030
1030

1031
1031
1032
+ To ask the user to select a media device and suitable media, you can use the
1033
+ media selector without any options :
1034
+
1032
1035
` ` ` yaml
1033
1036
media:
1034
1037
` ` `
1035
1038
1039
+ You can also use the media selector with an optional `accept` filter to limit the
1040
+ media types that can be selected. The user will not be asked to pick a device.
1041
+
1036
1042
` ` ` yaml
1037
- # Do not ask for a device but manually specify a filter for the media.
1038
1043
media:
1039
1044
accept:
1040
1045
- image/*
1041
1046
` ` `
1042
1047
1048
+ {% configuration area %}
1049
+ accept :
1050
+ description : >
1051
+ List of media types the user is allowed to select.
1052
+ type : list
1053
+ required : false
1054
+ {% endconfiguration %}
1055
+
1043
1056
The output of the media selector, is an mapping with information about
1044
1057
the selected media device and the selected media to play. There is also
1045
1058
metadata, which is used by the frontend and should not be used in the
@@ -1181,7 +1194,7 @@ object:
1181
1194
fields:
1182
1195
name:
1183
1196
label: Name
1184
- selector:
1197
+ selector:
1185
1198
text:
1186
1199
percentage:
1187
1200
label: Percentage
You can’t perform that action at this time.
0 commit comments