Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Video, "next" button is only displayed after the video ends

  • surveySn
  • surveySn's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
1 year 7 months ago #231334 by surveySn
Please help us help you and fill where relevant:
Your LimeSurvey version: 3.25.4+201215
Own server or LimeSurvey hosting:Own server
Survey theme/template:fruity
==================
Thanks to @Joffm, I use your JS:
Code:
<div class="embed-responsive embed-responsive-16by9">
<video autoplay="autoplay" id="myvideo"><source src="https://www.Mafosurvey.de/userfiles/happypeanuts.mp4"
type="video/mp4" /> browser unterstützt dieses Format nicht.</video>
</div>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
// Hide the "Previous" button
$('#ls-button-submit').hide();
// $('#ls-button-previous').hide();
var vid = document.getElementById("myvideo");
 vid.volume = 0.3;
 vid.onended = function() {
// Show the "Previous" button
// $('#ls-button-previous').show();
$('#ls-button-submit').show();
// $('#ls-button-submit').show().trigger('click');
}
 });
</script>

It was displayed perfectly on the PC,

but mobile browsers block autoplay.

Is it possible to improve it?

Show the play button,

Show next after the video has finished playing.

thanks everyone

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 7 months ago #231336 by Joffm
Add "controls" to the video.
[url] www.w3schools.com/html/html5_video.asp [/url]

Show next after the video has finished playing.

I do not understand. This is the main reason to use this script.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • surveySn
  • surveySn's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
1 year 7 months ago #231338 by surveySn
$('#ls-button-submit').show();
next button,


mobile browsers block autoplay,Do you have any idea?

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 7 months ago #231348 by Joffm
Again:
You have to use "controls".
 
BTW: More and more browsers block autoplay of a not muted video.

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

More
1 year 7 months ago #231349 by jelo
What Joffm means is that you no longer can rely on autoplay.

Replace
<video autoplay="autoplay" id="myvideo">
with
<video controls id="myvideo">

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose