diff --git a/www/demos/one2one.html b/www/demos/one2one.html index 5bef9a4..aa95307 100644 --- a/www/demos/one2one.html +++ b/www/demos/one2one.html @@ -295,8 +295,9 @@ }); $("#btn_start").click(startDemo); + // Never play util windows loaded @see https://github.com/ossrs/srs/issues/2732 if (conf.autostart) { - startDemo(); + window.addEventListener("load", function(){ startDemo(); }); } }); diff --git a/www/demos/room.html b/www/demos/room.html index 5d75f7f..164213d 100644 --- a/www/demos/room.html +++ b/www/demos/room.html @@ -199,8 +199,9 @@ }); $("#btn_start").click(startDemo); + // Never play util windows loaded @see https://github.com/ossrs/srs/issues/2732 if (conf.autostart) { - startDemo(); + window.addEventListener("load", function(){ startDemo(); }); } }); \ No newline at end of file