mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Replace deprecated String.prototype.substr() (#2948)
String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) so we replace it with slice() or substring() which work similarily but aren't deprecated. Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
This commit is contained in:
parent
84951cbc74
commit
8a75e8a165
11 changed files with 72 additions and 72 deletions
|
@ -15,7 +15,7 @@
|
|||
点击进入<a class="srs_demo" href="room.html?autostart=true">SRS多人通话演示</a>
|
||||
</p>
|
||||
<script>
|
||||
let roomName = Number(parseInt(new Date().getTime()*Math.random()*100)).toString(16).substr(0, 7);
|
||||
let roomName = Number(parseInt(new Date().getTime()*Math.random()*100)).toString(16).slice(0, 7);
|
||||
let elems = document.getElementsByClassName('srs_demo');
|
||||
for (var i = 0; i < elems.length; i++) {
|
||||
let elem = elems.item(i);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue