WebVisu - IFrame with audio in WebBrowser control freezes other visu elements

kislov
2020-04-10
2020-04-16
  • kislov - 2020-04-10

    Hi.
    I try to play audio in Web-visu through WebBrowser Control element.

    I use CODESYS Control Win V3, 3.5.14.30.

    I prepared 2 audio-files (1.mp3 & silence.mp3) and 2 .htm pages (audio.htm and blank.htm).
    Audio.htm call both .mp3 (it's solution for autoplay from this article: https://stackoverflow.com/questions/50490304/how-to-make-audio-autoplay-on-chrome/52228983#52228983), blank.htm just empty page for disable audio playing.

    I copy my .mp3 and .htm to /visu folder of soft plc.

    I create simple CODESYS project with WebBrowser Control and 2 buttons: Start Audio (show http://localhost:8080/audio.htm) and Stop Audio (http://localhost:8080/blank.htm)

    In service visu (CODESYS IDE visu) all works fine.

    But in web-visu after start audio playing there is no more reactions from other visu elements (button, CDS logo animation).

    I attach all my files (.projectarchive, .htm; instead my 1.mp3 you can use any .mp3 file) and video with problem demonstration.

    I will be grateful for any advices. Maybe I need other solution or other approach with my audio.htm...

    Link to my projectarchive: https://dropmefiles.com/QWNd2

     

    Last edit: kislov 2020-04-10
  • m.prestel - 2020-04-14

    Hello @kislov,

    I think you are running into the changes described e.g. here https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
    There is a distinct difference between the IDE Visualization and the webvisu.

    In the IDE a browser will be started to replace the browser element, in the webvisu a iframe will be spawned to reference the website.

    I was not able to reproduce these freezes.

    Best regards,

    Marcel

     
  • kislov - 2020-04-16

    m.prestel, eschwellinger - thanks, I will try with it.

     

Log in to post a comment.