/** * Theme cards for displaying excerpt and post content. */ jQuery(document).ready(function( $ ) { API.isAppearinCompatible(function (data) { // check if roomname is define in URI var aiRoom = lookToURI( 'appear-in' ); var aiRef = lookToURI( 'aiwp-ref' ); // if webRTC not supported show incompatibility message and hide room type selection // otherwise, if room set in URI, set up room // otherwise, do nothing if ( !data.isSupported ) { $('#appearin-incompatibility').show(); $('#aiwp-room-type-selection').hide(); } else if ( '' != aiRoom ) { // hide room type selection $('#aiwp-room-type-selection').hide(); // launch room launchAppearInRoom( aiRoom ); // respond to server with accepted invite $.post(ajaxurl, { action: 'aiwp_direct_session', aiwp_room: aiRoom, aiwp_ref: aiRef, aiwp_security: $('#appearin-room').data('security') }); } // end if }); function randomStringGenerator() { // predefine the alphabet used var alphabet = 'qwertyuiopasdfghjklzxcvbnm1234567890'; // set the length of the string var stringLength = 30; // initialize the room name as an empty string var randomString = ''; // repeat this 30 times for ( var i=0; i