Skip to content

Instructions for deriving media-source:// from Media Browser URL #38252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion source/_integrations/media_source.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,19 @@ data:
media_content_id: "media-source://media_source/local/videos/favourites/Epic Sax Guy 10 Hours.mp4"
```

[basic-configuration]: /integrations/homeassistant/#media_dirs
[basic-configuration]: /integrations/homeassistant/#media_dirs

### Identifying a media source from the media browser

If you wish to make use of the `media-source://` URI for an action, and the media is already available in the media browser (either as locally stored on the Home Assistant machine, or mapped using network storage) the following steps can help to determine the `media-source` uri.

1. Select **Media** in the sidebar.
2. Navigate to the folder containing the media you wish to play.\
*In this example, we will go **My media** > **NAS_Media**. This folder is a network share containing a collection of .mp3 files. One of which is named `my-music.mp3`.*
3. Copy the current URL from the URL bar.\
*for example: `https://home-assistant.local/media-browser/browser/app%2Cmedia-source%3A%2F%2Fmedia_source/%2Cmedia-source%3A%2F%2Fmedia_source%2Flocal%2FNAS_Media`*
4. Search for an online URL Decoder, paste in the copied text and decode.\
*`https://home-assistant.local/media-browser/browser/app,media-source://media_source/,media-source://media_source/local/NAS_Media`*

The last media source, in this case `media-source://media_source/local/NAS_Media` makes up the first part of the path, with the complete path being:
`media-source://media_source/local/NAS_Media/my-music.mp3`