videojs-abloop icon indicating copy to clipboard operation
videojs-abloop copied to clipboard

Hiding the start and end button

Open TheGr33k opened this issue 6 years ago • 4 comments

I was wondering whether its possible to hide the start and end button as i want to loop the whole audio by default and this feature is overkill for my use case.

TheGr33k avatar Feb 15 '19 18:02 TheGr33k

Yes, you can pass in createButtons: false as a setup option. See the readme.

<link href="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.4.1/alt/video-js-cdn.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.4.1/video.min.js"></script> 
<script src="https://unpkg.com/videojs-abloop/dist/videojs-abloop.min.js"></script>
<audio id="playerPFLHdOzobjFj" class="player-width player-height video-js vjs-default-skin vjs-big-play-centered" controls  preload="none"  poster="https://devzone2.filterbypass.me/s.php?k=57lt69gvoGRjIkf2fcojXCXRTrYSc4x4jN%2FESX8%2Bhgsyelg4S2op7fYnSmdHLob1&b=4">
<source src="http://techslides.com/demos/samples/sample.mp4" type="audio/mp4">
</audio>
	<script>	
			var audio = videojs("playerPFLHdOzobjFj",{
				plugins: {
					abLoopPlugin: {
						start: 0,
						end: false,
						enabled: true,
						createButtons: false
					}
				}
			});
		</script>

phhu avatar Mar 11 '19 16:03 phhu

Sorry to discuss in a closed issue.

I'm having a similar case, I dont want the start and end button, I tried using the createButtons: false but it also removes the toggle loop button, which I still need.

There is something I can do to only have the loop button?

mateusKoppe avatar Oct 24 '20 23:10 mateusKoppe

Hi, sorry for the delay on this: I didn't see the message. It should be possible to hide the buttons using CSS: I'll check the commands and get back to you. Alternatively, it might be easy enough to modify the createButtons option to allow buttons to be chosen. Again, I'll investigate and look at updating the code.

phhu avatar Jan 29 '21 14:01 phhu

Thanks for the reply. Just for you to know, we are not depending on this anymore so don't worry about it. But maybe this can still be a suggestion =]

mateusKoppe avatar Feb 02 '21 00:02 mateusKoppe