Forum

The Speaker, display one play icon, in ios

06 July 2017 11:37
Hi guys.
I have add speaker in my scene. Now show one play icon before start to play.

My question is:
Can dissable the play icon when start blend4web?. How?

Thanks.
06 July 2017 13:58
I am not sure exactly what you want but I attached a .blend file with a speaker sound that plays sound when the cube is clicked. Also some nodes to hide and show the button object. Take a look and see if this will help you.
06 July 2017 15:14
This play icon appear when put speaker in my scene. If not click in the play icon, dont continue to start game.
07 July 2017 01:38
Now I understand. I tried it on my iPad with Chrome and Safari. Both browsers will show this play icon before letting the app play. It must be and OSX issue. Android does not have this problem. I don't know the answer to this…
07 July 2017 06:50
Other web developers have this problem.
Try this in your CSS code:
video::-webkit-media-controls {
display:none !important;
}


Link
07 July 2017 14:16
He was able to hide the play icon with jquery but I can not click to have the loading process to continue.

var m_main = require("main");
m_main.append_loop_cb(hiddenPlayIconIos);
function hiddenPlayIconIos() {
  var statusHidden = false
  var playContainter = $('div[style="position: relative; height: 320px; width: 568px; background: rgba(0, 0, 0, 0.5); z-index: 999;"]');
  var playIcon = $('div[style="position: relative; height: 320px; width: 568px; background: rgba(0, 0, 0, 0.5); z-index: 999;"] > div');
  if(playIcon.css('display') == 'block' && statusHidden == false){
	console.log(playIcon);

	playIcon.click();
	playIcon.trigger('click');
	playIcon.css("display", "none");
	playContainter.css("display", "none");
	playIcon.trigger('touch');
	playIcon.trigger('tap');

	statusHidden = true;
	m_main.remove_loop_cb(hiddenPlayIconIos);
  }
};
07 July 2017 16:48
Hi guys.
I have add speaker in my scene. Now show one play icon before start to play.

My question is:
Can dissable the play icon when start blend4web?. How?
Hi,

this button is required according to mobile browsers security policy.
However there is a workaround. You can use external button to start loading your b4w app and set media_auto_activation init parameter to false. In that way play icon won't appear and sound will be played.
You can take a look a this tutorial from the SDK
Blend4Web Team - developer
Twitter
LinkedIn
10 July 2017 15:44
Reply to post of user Konstantin Khomyakov
Hi,

this button is required according to mobile browsers security policy.
However there is a workaround. You can use external button to start loading your b4w app and set media_auto_activation init parameter to false. In that way play icon won't appear and sound will be played.
You can take a look a this tutorial from the SDK

10 July 2017 16:23
Sorry, wrong link
You need to take a look at the web_page_integration project from the sdk
Blend4Web Team - developer
Twitter
LinkedIn
 
Please register or log in to leave a reply.