JWT: a quicker and simpler version using the HTML5 service
The bottom sample is a PHP sample, but you can easily adapt it to JS or ASP in needed. let assume your TOKEN = 12134234 and id account = 1
Step 1: you create an array of your user such as:
$json = json_encode(array( 'password'=> '12134234', 'id_account'=> '1', 'username'=> 'myUsername', 'gender'=> '1', //use 1 man - use 2 for female 'role'=> 'user', 'birthyear'=> '33', 'profile_link'=> "link profile user", 'immage_user'=> 'https://www.html5-videochat.com/homepage/img/logo_a.png', 'room_id'=> 'use id room' ));
Step 2 : you encode it using the html5 JWT online service
$encoded = file_get_contents("https://html5-videochat.com/applications/chat_webcam_personale/crypt.php/".base64_encode($json));
Step 3 : Get all links inside an iframe
<iframe id="iframeChat" src="https://www.html5-videochat.com/index.php?/chat/$encoded" allowfullscreen="" allow="geolocation; microphone; camera; allowfullscreen; autoplay;" ></iframe>
And that’s ALL:
role: can be admin, moderator, premium, user, ospite, deejay, custom1, custom2
avatar is the http:// image of the expected avatar
profile: the link to the user profile (if available)
startRoom : the id of the room where to start in (roomid is an integer number)
Get user in room, global or single
Global;
Use the name_user_global variable to see the complete list of users inside the rooms
https://www.html5-videochat.com/index.php?/pca/info_user_chat/&id_account=1&name_user_global=true
For the global number of users use the num_user_global variable
https://www.html5-videochat.com/index.php?/pca/info_user_chat/&id_account=1&num_user_global=true
Single;
Use the name_user_room variable to see the complete list of users inside the rooms
https://www.html5-videochat.com/index.php?/pca/info_user_chat/&id_account=1&roomId=0&name_user_room=true
For the global number of users use the num_user_room variable
https://www.html5-videochat.com/index.php?/pca/info_user_chat/&id_account=1&roomId=0&num_user_room=true
Use your variable;
- id_account; - your account id, e.g. 1
- roomId; - room id e.g. 12
example web page html
<?php $json = json_encode(array( 'password'=>$id_code_pass, 'id_account'=> $_id_account, 'username'=> $name, 'gender'=> $gender, 'role'=> $ruolo_name, 'birthyear'=> $age, 'profile_link'=> "$get_profile", 'immage_user'=> 'https://www.html5-videochat.com/homepage/img/logo_a.png', 'room_id'=> $id_room )); $encoded = file_get_contents("https://html5-videochat.com/applications/chat_webcam_personale/crypt.php/?code_crypt=".base64_encode($json)); ?> <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>HTML5 Videochat</title> </head> <body> <div style="width: 1024px;height: 800px;"> <iframe id="iframeChat" src="https://www.html5-videochat.com/index.php?/chat/<?php echo $encoded; ?>" allowfullscreen="" allow="geolocation; microphone; camera; allowfullscreen; autoplay;" ></iframe> </div> </body> </html>