Merge pull request #34051 from nextcloud/fix/34027/play-audio

fix: play single audio shares with the viewer
This commit is contained in:
Simon L 2022-09-13 15:41:13 +02:00 committed by GitHub
commit 7e6dffd38c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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) {