Skip to content
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

MediaPlayer Lava Short Code Download Enabled with MP3 File But Download Link is Empty #5426

Closed
frogydiak opened this issue Apr 29, 2023 · 7 comments

Comments

@frogydiak
Copy link

frogydiak commented Apr 29, 2023

Please go through all the tasks below

The download button is showing up but clicking on it will download the page HTML instead of the MP3 file and looking at the button link, you'll notice that the href is empty.

image

Expected Behavior

Clicking on the download button should download whatever is in the src I supposed:

image

Actual Behavior

Clicking on the download button will download the page HTML file instead.

Steps to Reproduce

Use the MediaPlayer Lava short code like this:

{% assign sermonAudio = Item | Attribute:'SermonAudioFile','Object' %}
{% if sermonAudio and sermonAudio != empty %}
<div class="audio-player m-3">
{[ mediaplayer src:'{{ sermonAudio.Url }}' type:'audio' controls:'play,progress,mute,volume,download' ]}{[ endmediaplayer ]}
</div>
{% endif %}

Manually set the controls with download.

Rock Version

14.2## Client Culture Setting
en-US

@cabal95
Copy link
Member

cabal95 commented Oct 6, 2023

@frogydiak This appears to be fixed. I would guess it was part of #5445, since that updated the Plyr library version it was most likely an issue in the library. I tested on 15.3 and pre-alpha and both include the link correctly. I also verified that clicking on the button does actually work. I'm going to mark this as fixed in 15.3, but if you have 15.1 it is probably fixed there too.

<div style="max-width: 400px;">
{[ mediaplayer src:'https://file-examples.com/storage/feaade38c1651bd01984236/2017/11/file_example_MP3_700KB.mp3' type:'audio' controls:'play,progress,mute,volume,download' ]}{[ endmediaplayer ]}
</div>

image

@frogydiak
Copy link
Author

@cabal95 , I'm using the Audio File attribute to contain the MP3 file and it gets uploaded to S3, so, in my lava I'm using:

{{ 'Global' | Attribute:'PublicApplicationRoot' }}GetFile.ashx?guid={{ audioGuid }}

I just tested it again and the link to the file is still missing. Seems like you are using the default way messages was setup and is using a text attribute and a direct link to the mp3 file wherever it was hosted. That way is too technical for our staff.

Thanks for looking at this.

@cabal95
Copy link
Member

cabal95 commented Oct 6, 2023

@frogydiak Can you provide the actual URL that you are passing to the mediaplayer shortcode so we can replicate exactly what you are doing when the shortcode executes?

@cabal95 cabal95 reopened this Oct 6, 2023
@frogydiak
Copy link
Author

@cabal95 Here it is: https://my.lakeave.org/GetFile.ashx?guid=db4121bb-5e67-45fb-99df-675fbabfebb0

@cabal95
Copy link
Member

cabal95 commented Oct 6, 2023

@frogydiak Okay I think I was able to reproduce it. It only happens in Chrome. It seems to work fine in Firefox. Just to make sure I'm hunting down the same cause of the problem you are having, can you try in Firefox and see if the download URLs work correctly?

@frogydiak
Copy link
Author

@cabal95 Yes, you are right, it is working properly in FireFox (Mac). I also tested it with Microsoft Edge (latest version for Mac) same thing as Chrome no file link. It is working properly with Safari though.

@cabal95
Copy link
Member

cabal95 commented Oct 7, 2023

Thanks for confirming @frogydiak. I have a fix that I will finish up Monday after some additional testing.

@cabal95 cabal95 closed this as completed in 34de663 Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants