-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix: play single audio shares with the viewer #34051
Conversation
Signed-off-by: Max <max@nextcloud.com>
Needs a rebase after #34028 is merged |
@@ -153,7 +153,7 @@ OCA.Sharing.PublicApp = { | |||
}); | |||
|
|||
if (OCA.Viewer && OCA.Viewer.mimetypes.includes(mimetype) | |||
&& (mimetype.startsWith('image/') || mimetype.startsWith('video/'))) { | |||
&& (mimetype.startsWith('image/') || mimetype.startsWith('video/') || mimetype.startsWith('audio'))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use the supported Viewer mimes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Text has its own hook into files_sharing and does a bunch of tweaks there for the ui.
I have not been able to figure out a good way to use viewer with the text component in this context without larger rewrites.
I agree it would be cleaner.
My understanding is that we are mostly doing this to enable video playback and it should be backported to earlier versions (22 at the time but now at least 24). So I tried to keep changes minimal.
Looks like the styling in the viewer relies on |
lets have a look at the styling after #34028 is merged. However sounds like a good approach. |
Sorry, was on a different PR in my head... |
Or rather lets do the CSS improvements in a follow up... |
Will have a look at the styling now. @max-nextcloud @skjnldsv do you want to refactor the mimetype handling still? |
Style fixes are in #34055 |
Use the viewer to play audio files.
Close #34027