Skip to content

[WIP] Add a new feature media to simplify handling of media in Openhab #3140

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

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

lo92fr
Copy link

@lo92fr lo92fr commented Apr 8, 2025

Add a new feature media to simplify handling of media in Openhab

Description

See this issue for description :
openhab/openhab-core#4710

@lo92fr lo92fr requested review from ghys and florian-h05 as code owners April 8, 2025 16:40
@florian-h05 florian-h05 marked this pull request as draft April 8, 2025 19:59
@florian-h05 florian-h05 added enhancement New feature or request main ui Main UI awaiting other PR Depends on another PR labels Apr 8, 2025
@lo92fr
Copy link
Author

lo92fr commented Apr 12, 2025

Hello All,

@florian-h05 , @ghys,

I would appreciate if someone that have more experience that me on Vue Framework can give advice about these first version.
More specially on the implementation of the media popup.
I based it on what have been done for the analyzer popup, but I'm not sure it it's the good way two implement this.

Laurent

@florian-h05
Copy link
Contributor

In general I do think a popup is the proper way of displaying the media selection.
Wrt to the implementation, I do think it is a good way to have the Item name and path in the URL as this allows browser navigation and proper reloading of the page, though I would extract the query params in the media-popup component and expect the media component to get that data as props.

@lo92fr
Copy link
Author

lo92fr commented Jun 12, 2025

do think a popup is the proper way of displaying the media selection.
Wrt to the implementation, I do think it is a good way to have the Item name and path in the URL as this allows browser navigation and proper reloading of the page, though I would extract the query params in the media-popup component and expect the media component to get that data as props.

Hello @florian-h05,

I've restart to work on this today, but have to said that currenlty I'm failling to have a proper implementation of this popup.

What happens today is that each time I click on a link, the popup is reload.
That's not good because the state is finally corrutped after the second click, and when the popup is closed, we have inconstistent url.

What I understand is that we need in such case a subroute scenario for the popup, what is implemented in vue v3 with a tag. But If I don't mistake, openhab is using today vue v2, so not tag.

Some hints seems to use a f7-view inside the popup to make a sub view.

Something likes:



But I feel to make it working correctly because it always finish with some infinite rendering loop on the popup component.
So definitivly something wrong in my implementation.

Also make some try with chatgpt to make the fixes, but also failed as well.

Is someone more experiment then me on vue and f7 framework can help me this resolved, it would be great.

Laurent.

@lo92fr
Copy link
Author

lo92fr commented Jun 18, 2025

Hello,

Make some progress on this today.
Of course, it will be not ready for 5.0, perharps for 5.1.
I fix some issues on popup navigations in UI part make things a littles more stables.
Also start to see how I can add a media Renderer popup to select the output device directly from the oh-player-control.

Still a lot of work to be done on it.
I like to have something simple to use for end user, where you have only one way to implement this whatever device you have in your configurations.

Laurent.

@lo92fr
Copy link
Author

lo92fr commented Jun 18, 2025

@florian-h05,

Forget about my last question, it seems I finally find a way to implement it somewhere correctly.
I think it will be also be better and more easy when openhab move to framework7 v7 and vue v3.
But for now, it should work in acceptable way like this.

As said in previous post, still a lot of work to be done to make it more stable and usable for end user.
I will give update as soon as possible.

Laurent.

lo92fr added 4 commits June 19, 2025 17:04
UI enhancement on media browser

Signed-off-by: Laurent ARNAL <[email protected]>
Signed-off-by: Laurent ARNAL <[email protected]>
…cenario like target device change (currently test with spotify binding)

Signed-off-by: Laurent ARNAL <[email protected]>
lo92fr added 16 commits June 22, 2025 19:10
Signed-off-by: Laurent ARNAL <[email protected]>
Signed-off-by: Laurent ARNAL <[email protected]>
Signed-off-by: Laurent ARNAL <[email protected]>
add missing file in last commits !

Signed-off-by: Laurent ARNAL <[email protected]>
Signed-off-by: Laurent ARNAL <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting other PR Depends on another PR enhancement New feature or request main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants