Add regular playlist to endpoint data in stream#42130
Add regular playlist to endpoint data in stream#42130uvjustin wants to merge 2 commits intohome-assistant:devfrom
Conversation
|
@hunterjm Not sure if this is what you had in mind. I haven't tested it yet, but something like this should work. |
Yeah, it was a bit of a premature addition on my part. I tried to architect the component to be able to easily add additional providers with different formats in the future (like DASH, or some new thing that comes out in the future). It actually worked well when I made the addition of the |
|
Actually, after looking at the frontend, maybe it isn't necessary to do all this. ha-hls-player is opening the master playlist, so we can grab the regular playlist name from the master playlist there which would remove any coupling to the backend (besides assuming we have a master playlist). Otherwise, besides the changes here, we have to fetch and store 2 different urls and pass them along in javascript attributes from ha-camera-stream down to ha-hls-player. |
|
Is the master playlist not playable in the frontend? When I tested it it worked just fine. Or is this an ExoPlayer thing? |
|
The master playlist is playable, nothing to do with ExoPlayer. I just passed along the regular playlist instead of the master playlist in ha-hls-player to avoid having all the players do an extra load of the master playlist. None of the players needs the master playlist (We only added the master playlist for the google cast missing audio problem. Afterwards I also realized we could also use the master playlist to check the codec before resorting to ExoPlayer for H265 only).
2 is easily solvable by changing the string replace to a proper url substitution from the parsed master playlist. |
|
Closing this as home-assistant/frontend#7417 seems cleaner. |
Proposed change
In ha-hls-player in the frontend we added a step to skip the master playlist and go straight to the regular playlist after the master playlist is loaded the first time. We used a simple string replace to get the regular playlist there. This PR adds the regular playlist to the endpoint data and allows it to be accessed via sending a "master_playlist=false" in the WS message.
Type of change
Example entry for
configuration.yaml:# Example configuration.yamlAdditional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: