Your comments
Hello Yohan!
On modern web browsers, audio playback in a web page must be preceded by user interaction with the page (e.g. user clicks on a button, or touches the screen). This user action “activates” the web page which will then allow audio playback. This restriction is intended to prevent a web page from playing audio unprompted. Attempting to do so will not cause a problem – but may not work, depending on the browser & the circumstances.
On desktop browsers, the
restriction is not absolute. Some browsers will allow play-on-load
for a user who has visited your page before and interacted with media
on the page. The policies enacted by browsers in this regard are both
evolving & undocumented.
The main takeaways should be:
- It is ok to try to initiate speech as soon as the page loads (if you are doing so using the API verify that API has loaded first!).
- You should be aware that such play-on-load attempts may be blocked by the browser, and will always be blocked on mobile browsers.
- It therefore makes sense to design your web page / application to not rely on play-on-load. You should always provide another way for the user to initiate the verbal interaction with your speaking character, in case play-on-load is blocked.
I hope this is helpful.
Regards,
Gil
The SitePal Team
You are welcome!
I see it works great on your site now & I'm glad our new feature found immediate usefulness :-)
Regards,
Gil
Hi Wayne!
You need to *replace* the previous version of the embed code in your page - with the new version.
Instead - your page now contains 2 SitePal Embed codes -
One in page BODY and other is in page HEAD
Please delete the embed code from the HEAD section and it should work fine.
You can check our own test page code as an example to see how it was done.
http://www.workboy.com/qa/3D_live/responsive.html
This is the code you need to REMOVE
<script
type="text/javascript" src="//vhss-d.oddcast.com/vhost_embed_functions_v4.php?acc=8142431&js=0"></script><script
type="text/javascript">AC_VHost_Embed(8142431,600,800,"",1,0,2733251,0,1,0,"KhW6aiBOI8hg0w2GMWDpkRibS59QS3Ue",0);</script>
Regards,
Gil
I don't believe the embed code has been updated.
please see the instructions in my post.
Hello Wayne!
The new implementation is available.
To take advantage of the new responsive embed mode, you would need to re-copy your SitePal Scene's embed code into your web page. But this time - enable the new "Responsive" attribute before copying the embed code - as you can see in the attached screenshot.
We've also tried out the new functionality on a copy of your page - as part of our QA review. You can see the page here (with out own Scene replacing yours for our testing). please check.
http://www.workboy.com/qa/3D_live/responsive.html
Let me know if any questions or comments.
Best,
Gil
Wayne -
The update is in QA review. It should be deployed & available later today or tomorrow.
I will post an update here.
Regards,
Gil
Hi Wayne,
Thanks for sharing your page.
The issue is clear - you would like to avoid using API calls for finetuning responsive behavior.
We're actually implementing a non-API solution for that -
as you suggested, a "responsive" embed mode, which should be available to all our clients in the next few days. I will follow up & advise when this feature is available.
Also - to ensure you learn about this update when available - please send a note to support@sitepal.com - asking about the "Responsive" embed mode; This will open a ticket with support.
Regards,
Gil
Hello!
Though Eva's advice below is quite old, it still applies.
Can you please post a link to your page where we can view your SitePal scene embedded in the page?
Or if you prefer - please send us the link to: support@sitepal.com.
This will allow us to review your implementation and advise further.
In addition - since Eva posted her response so long ago we have since introduced API controls that would allow you to dynamically resize the Scene in your page without reloading it. This method is useful for implementing responsive design.
Checkout our API function "dynamicResize" - in the Standard (client) API Reference - available on our support page here - www.sitepal.com/support
Also - please see the following technical support examples as a reference:
https://sitepal.com/api/examples/resize3D.html
https://sitepal.com/api/examples/resize_2.html
Regards,
Gil
The SitePal Team
Customer support service by UserEcho
Yohan -
I think I understand what you are asking - let me try to explain further.
* You can set your Scene to "play on load" (turn on in Scene Options)
* As you described - this may work fine in your development environment (localhost), but will be blocked by the browser when served from the web server.
* To add to the confusion, "play on load" might not always be blocked - it may work sometimes.
* For new users coming to your web site - it will almost always be blocked.
So, in designing your web page, you should assume that the character will not play-on-load. If the speech is a critical part of the page design, you may want to add a prominent button, or pop-up, to prompt the user to interact with the page. This button can be used to initiate speech using the API.
You asked about "setStatus" - this function is part of our Standard (Client) API - a set of JavaScript API functions that is built in to SitePal and can be used from your web page when you embed your speaking charactrer.
Please review API documentation and examples on our support page here:
www.sitepal.com/support
Hope this helps,
Gil