beginners questions serie: how to start audio in mediabox-CK and change controls

More
1 year 11 months ago - 1 year 11 months ago #66736 by raphi
Hello Cedric,
I want to start an audio file in the lightbox. I am not sure, how the HTML should be correct for the link, opening the lightbox. I have tried this:
Code:
<a href="https://my-website.de/images/audio/how-to-have-fun.mp3" type="audio/mpeg" controls rel="lightbox[400 60]">AUDIO-Link mit Mediabox-CK</a>
The audio starts as soon the lightbox is open and it stops -like video- when the lightbox is closed. That's OK. But I want to extend the width of the audio controls, so that the visitor can more easily move the slider to a certain play time. How can I achieve this?

The width dimension of the audio control should behave similar to that of a video, when I have defined the dimensions for the video within the rel="lightbox[xxx yyy]" code, so that the controls can have a width of up to 80% but not more than max-width: 500px.

By searching the web, I have found, that it is not as simple to modify audio controls. I found a simple solution for that here:
Modifying the audio controls
Here is what they propose:
Code:
<audio id="player" controls autoplay>   <source src="http://xseignard.github.com/webGLWebAudioAPI/sound/OGLikeCapone.ogg" type="audio/ogg">   Your browser does not support the audio tag. </audio>​​​
and additional this CSS:
Code:
#player {  width: 100%; }​

But now I have no clue how to insert this in the link, which is starting the lightbox. Would you please give me a hint?
Last edit: 1 year 11 months ago by raphi.

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago #66744 by ced1870
Hi
the player from the Mediabox is already an <audio> tag with width 100%
it will load the player from the browser, so you must check how to customize the settings of an HTML5 audio player using CSS

CEd

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago #66748 by raphi
Yes indeed, I can see, that the width of the controls graphics are very dependent from the webbrowser. On my desktop I am running Firefox and Chromium. In both, the controls show up at about 380px width. On my smartphone in landscape position, the width of the controls is 100% full page width.

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago #66750 by ced1870
give me the url of your page so that I can check

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago #66765 by raphi
Thank you for your engagement and your very quick replies.

I am running a test website. There is one page, where I have now assembled all three use cases with Mediabox-CK. You find it here: Test Webpage for Mediabox-CK

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago #66770 by ced1870
I have checked by my side, if you want to change the size you can change it in the plugin options (plugin system >> mediabox ck >> general options >> default width)

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

Time to create page: 0.227 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 1050 guests and no members online