Mediaplayer Now Playing and Control

A list widget that combines track, artist, playback service, and play controls into one widget. The widget is based on the Channels provided by the Chromecast binding but should support most media players. When the player is idling, the widget will be hidden.

The widget works using an Item name prefix so you must name your Items with a common prefix. The last part of the name of the Items should be:

  • <Prefix>_MediaTitle : name of the media playing
  • <Prefix>_MediaArtist : name of the artist
  • <Prefix>_Idling : Switch Item that is set to true when the player is not playing anything
  • <Prefix>_App : The name of the app currently playing
  • <Prefix>_MediaControl : a Player type Item to control play, pause, fast forward and rewind

Changelog

Version 0.1

  • initial release

Resources

uid: rlk_media_control_list
tags:
  - list
  - media
props:
  parameters:
    - description: Player name
      label: Name
      name: name
      required: false
      type: TEXT
    - description: Item prefix
      label: Prefix
      name: prefix
      required: true
      type: TEXT
  parameterGroups: []
timestamp: Feb 4, 2021, 2:14:55 PM
component: oh-player-item
config:
  icon: f7:hifispeaker
  iconColor: black
  title: =props.name
  subtitle: =items[props.prefix + "_MediaTitle"].state + " by " + items[props.prefix + "_MediaArtist"].state
  visible: =(items[props.prefix + "_Idling"].state == "OFF")
  trackItem: =props.prefix + "_MediaTitle"
  after: =items[props.prefix + "_App"].state
  artistItem: =props.prefix + "_MediaArtist"
  showRewindFFward: false
  item: =props.prefix + "_MediaControl"
1 Like