{{#Name=Media}} {{#Description=Standard card for displaying a Media device}} {{#Version=1.0}} {{#Author=HomeSeer}} {{#CanBeDeleted=False}} {{#InternalType=Media}} {{#SaveList=}} {{if w==null}} {{widget_id=queries['widget_id']}} {{w=widget_by_id widget_id}} {{end}} {{num_widgets = widget_count w.id}} {{d=device_by_ref w.device_ref}} {{dbs=dashboards_ref}} {{if d}}
{{if w.device_ref==""}} Edit to select a media device {{else}}
{{if w.show_feature_bar}}
0}} onclick="show_children({{ d.primary_ref }})" {{end}} data-toggle="modal" data-target="#childcontrol" class="fa-point text-right col mr-2 media_children_icon d-xl-inline-block float-xl-none border border-top-0 border-right-0 border-left-0 pb-1"> {{ for c in d.children }} {{if c.device_sub_type==14 || c.device_sub_type==1 || c.device_sub_type==3 || c.device_sub_type==4 || c.device_sub_type==13 }} {{else}} {{ if c.status_suffix=='%' || c.status_suffix=='@S@' }} {{ status_text_no_html c.ref }} {{ end }} {{end}} {{ end }} {{ if d.child_count == 0 }} {{ end }}
{{end}}
{{if location1_display_first}} {{if w.show_location1}}{{d.location}}{{end}} {{if w.show_location2}}{{if use_location2}} | {{d.location2}} {{end}}{{end}} {{else}} {{if w.show_location2}}{{if use_location2}}{{d.location2}} | {{end}}{{end}}{{if w.show_location1}}{{d.location}}{{end}} {{end}}
{{if w.show_name}}
{{d.name}}
{{end}}
{{if w.show_artwork}}
{{ for c in d.children }} {{if c.device_sub_type==14}}
{{ status_image c.ref 80 }}
{{end}} {{end}}
{{end}} {{if w.show_player_status}}
{{ for c in d.children }} {{if c.device_sub_type==1}}
{{status_text_short c.ref}}
{{end}} {{end}}
{{end}}
{{if w.show_player_controls}}
{{ for c in d.children }} {{if c.device_sub_type==3}} {{for p in c.vspairs}} {{if p.control_use=='_Previous'}}
{{end}} {{if p.control_use=='_Pause'}}
{{end}} {{if p.control_use=='_Play'}}
{{end}} {{if p.control_use=='_Next'}}
{{end}} {{end}} {{end}} {{end}}
{{end}} {{if w.show_volume}}
{{ for c in d.children }} {{if c.device_sub_type==4}} {{for p in c.vspairs}} {{if p.control_use=='_Volume'}}
{{end}} {{end}} {{end}} {{end}} {{ for c in d.children }} {{if c.device_sub_type==13 || c.device_sub_type==4}} {{havetoggle=false}} {{for p in c.vspairs}} {{if p.control_use=='_MuteToggle'}} {{havetoggle=true}}
{{if (device_value c.ref)==0}} {{end}} {{if (device_value c.ref)==1}} {{end}}
{{end}} {{end}} {{if !havetoggle}} {{for p in c.vspairs}} {{if p.control_use=='_Mute'}} {{end}} {{if p.control_use=='_UnMute'}} {{end}} {{end}} {{end}} {{end}} {{end}}
{{end}}
{{end}}
{{end}}