fix: play single audio shares with the viewer

Signed-off-by: Max <max@nextcloud.com>
This commit is contained in:
Max 2022-09-13 14:42:40 +02:00
parent 91040283b1
commit d8ff71292f
No known key found for this signature in database
GPG key ID: 0F5BFA367A00BACE

View file

@ -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'))) {
OCA.Viewer.setRootElement('#imgframe')
OCA.Viewer.open({ path: '/' })
} else if (mimetype.substr(0, mimetype.indexOf('/')) === 'text' && window.btoa) {