Skip to content

Siri/Shortcut/Media Intent support

Avi Wadhwa requested to merge aviwad/vlc-ios:sirikit into master

A work in progress. Have implemented INPlayMediaIntent & INAddMediaIntent till now. Only supports iOS 14+ due to embedding intent within application. Fixes #1344 (closed)

INPlayMediaIntent: If you specify a song, artist, album, playlist, or genre, to Siri, VLC will be able to play it in the background. Specify a video or a media group, and VLC will open and play it in the foreground.

INAddMediaIntent: If you ask VLC to add the currently playing media item to a playlist, VLC will be able to add it.

Current problems:

  1. I haven't implemented support for it to play a video yet.
  2. Currently returning the .handleInApp response code works but has siri say "Sorry, you'll need to continue in VLC"
  3. Audio files always opened in the video player.

Current changes:

  • new Intent Coordinator class
  • added Siri entitlement to VLC-iOS
  • new identifier property in VLCMetadata
  • add intent handling for INPlayMediaIntent, INAddMediaIntent (handler in VLCAppDelegate, sent to my Intent Coordinator class)

Next steps:

  • add fuzzy search (ask siri to play song "Love", and find the song "luv" in the VLC library VLCMediaLibraryKit#30)
  • add generic command support ("play something / play some music")
  • fix shuffle (#1726 (closed))
  • fix VLC stopping playback if asking siri to play something while something is already playing (#1711?)
  • make sure video always opens in fullscreen (occasionally opens in miniplayer... need to debug)
  • use secondary data to enhance search (use every non-nil property given by Siri when searching for media)
  • if playing audio, start playback from beginning.
  • queue rest of the album if 1 song is playing
  • add support for INSearchForMediaIntent
  • if playing media group, start from last played media item
  • add support for INAddMediaIntent
  • add support for intent donations -> siri suggesting users to continue listening to an album, continue watching a film, etc
  • add shortcut support for these intents. Unsure how to, and if they're not already integrated into the Shortcuts platform
Edited by Avi Wadhwa

Merge request reports