![]() |
.play() and Chrome ! - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: .play() and Chrome ! (/showthread.php?tid=884) |
.play() and Chrome ! - JMM - 04.07.2017 Hi, This script works perfectly with IE and Firefox but not with Chrome (Win. and Android). Someone would have an idea for this problem ? Code: <?xml version="1.0" encoding="UTF-8"?> Regards, JMM. RE: .play() and Chrome ! - buuuudzik - 04.07.2017 Please check what kind od error is in the console. RE: .play() and Chrome ! - JMM - 04.07.2017 Thanks for the help No error in the console. ![]() RE: .play() and Chrome ! - admin - 04.07.2017 Chrome requires some kind of user interaction before audio can be played. See this post for a work-around: https://forum.logicmachine.net/showthread.php?tid=275&pid=2449#pid2449 If you need a simple "beep" sound, you can try this example: https://forum.logicmachine.net/showthread.php?tid=275&pid=1616#pid1616 RE: .play() and Chrome ! - JMM - 04.07.2017 .play(), works very well in a simple page HTM with Chrome, but once integrated into LM do not work any more. With IE or Firefox is OK !. JMM. Thanks Admin ! I need to read alerts in MP3 and; https://forum.logicmachine.net/showthread.php?tid=275&pid=2449#pid2449 is for IOS not Android or Win. ![]() RE: .play() and Chrome ! - JMM - 04.07.2017 HI, with this script added into the custom javascript, it is OK for: -Firefox and Chrome (windows) -Firefox (Android) And always bad for Chrome (Android) !! an idea? ![]() Code: //-------ALARME MP3-------------------------------------- RE: .play() and Chrome ! - JMM - 05.07.2017 Hi! For the people which would be interested in this problem, that's why Chrome does not answer has .play() ! https://bugs.chromium.org/p/chromium/issues/detail?id=178297 Here is the solution to disable the user gesture. ![]() ![]() Chrome for Android: You can disable the 'gesture required' flag by going to 'about:flags' in your chrome. Then find the flag 'disable gesture requirement for media playback' and click 'enable', at the bottom of the page box will appear that says 'Your changes will take effect the next time you relaunch Google Chrome' and a button 'Relaunch Now'. Click the button. You can now start videos via javascript. For some reason this seems to be the best kept secret on the Internet. I searched for months before finding this. Regards, JMM. |