How should broadcast behave ?

New broadcast features

You can now decide how the broadcast behaves. The broadcast feature allows to chatter to broadcast his webcam stream to all users.

You can enable the broadcast feature per gender (gender panel) or per roles (roles panel)

Th default behaviour when an user was broadcasting his stream was to open automatically his webcam for all connected users.

You can now choose between 3 different behaviours

  1. opens: this is the default behaviour and as described above, it opens webcam panel for all connected users
  2. chat warn: you will receive the notification that an user streams his webcam inside the chat panel
  3. notification warn: you will receive the notification that an user streams his webcam inside a small popup

You can also specify the JS function to be called when broadcasts starts and ends:

jsCallBackStartBroadcast: function name to be called when broadcast starts

jsCallBackStopBroadcast: function name to be called when broadcast ends

 

New feature: add you RSS as ticker marquee

RSS news as Marquee

It is now possible to add RSS news:

Go to your chatadmin and you find RSS panel into your news management section.

 

You RSS needs to be standard formatted. That means it needs to have these XML tags inside:

titledescriptionlinkpubDate

You can also assign if your RSS feed will be only for one room or for all rooms.

The rss feed content will scroll just above your input text chat.

 

call1to1

New Feature: call 1to1 between 2 users

A new exciting feature is now available: call1to1 between 2 users.

You must enable that feature in you chat admin, in roles menu.

Then an user can request a 1to1 exclusive call by clicking another user’s icon or user item.

If accepted, you will have access to exclusive 1to1 video call, skype like.

When user is in 1to1call, he cannot receive other 1to1 call: his status is set to busy, until he call finishes.

To accept a call, both parties must have their webcam on.

The call1to1 is available in user’s menu

menu

 

New private and whisper features

New private text and mention features

For better readability and clarity we renamed:

“Send quick message” to “Mention”

and we remove the # and @ in texts and add clearly the avatar and the action of the user:

You clearly see now the avatar of the user you are sending a mention or a private text

You can however style use the shortcuts # and @ to autocomplete the user

# is for private message

@ is for mention.

This change also corrects the user of users that were containing some [SPACE] character inside their usernames.

JWT: a quicker and simpler version using the HTML5 service

Here is a quicker and simpler version of integrating  HTML5 chat into an existing website than the JWT version described in that post

The bottom sample is a php sample, but you can easily adapt it to JS or ASP in needed

 

Step 1: you create an array of your user such as:

$json = json_encode(array('username'=>'myUsername', 'password'=>'myChatAccountPassword', 'gender'=>'male', 'role'=>'user', 
'image'=>base64_encode('https://html5-chat.com/img/malecostume.svg'), 'profile'=>'https://monsite.com/profile/myUserername'));

Step 2 : you encode it using the html5 JWT online service

$encoded = file_get_contents("https://jwt.html5-chat.com/protect/".base64_encode($json));

Step 3 : you inject that encoded string into your JS script

<script src="https://jwt.html5-chat.com/script/xxxxx/<?=$encoded?>"></script>

 

And that’s ALL:

role : can be admin,  user, guest,  dj, custom1, custom2, custom3

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)

Replace the xxxxx in script by your script id (a positive integer)

If you want to use JWT on your server, please refer to this post.

 

<?php $json = json_encode(array('username'=>'myUsername', 'password'=>'myPassword', 'gender'=>'male', 'role'=>'user', 'profile'=>'https://monsite.com/profile/myUserername', 'image'=>'https://html5-chat.com/img/malecostume.svg'));
$encoded = file_get_contents("https://jwt.html5-chat.com/protect/".base64_encode($json), 'startRoom'=>5);
?>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>HTML5 chat</title>
</head>
<body>

<div style="width: 1024px;height: 800px;">
    <script src="https://html5-chat.com/script/xxxxx/<?=$encoded?>"></script>
</div>

</body>
</html>

 

Notice: if file_get_contents is DISABLED on your hosting, you can use the curl

$curl= curl_init();
curl_setopt_array($curl, array(
      CURLOPT_RETURNTRANSFER => 1,
      CURLOPT_URL => "https://jwt.html5-chat.com/protect/".base64_encode($json)
));
$encoded = curl_exec($curl);

HTML5 goes webrtc now !

A very import news : HTML5 chat enables WEBRTC support

webrtc

that’s a great news: HTML5 supports both: Flash and Webrtc : you can choose that feature from your chatadmin panel.

Each technology has pros and cons:

Flash

Flash is used for streaming – that means ONLY flash based devices could stream. However all devices can watch the video.
Those with flash have real time video. Those without use HLS and have about 5 seconds of delay.

Webrtc

Webrtc is used for both streaming and playing. This technology is for now ONLY supported by chrome and Firefox browser.
It also works on Android.
Quality is superior to flash. It also includes a better echo cancellation algorithm.

However the latest Safari11 and IOS11 webrtc support is insufficient. Safari uses the old H264 codec. Besides, teh IOS webrtc support uses and old API

how to upload images ?

You can now upload images in html5-chat

New features now allows you to UPLOAD your own images.

Max size of image is set to 50 Kbytes to avoid abuses.

As usual, fo to your panel admin and choose the config tab.

 

Check the Allow users to upload images into the chat checkbox.

Enter your chat: you will now be able to upload your OWN images into the chat !