0

I noticed Spark AR has a live streaming module Is there a way to simulate or test live reactions and comments without having to go live on facebook?

I would like to test if the following code actually works but I don't want to test it live on my facebook account and ask people to react and comment on the stream.

const LiveStreaming = require('LiveStreaming');
const Scene = require('Scene');

const matchCounterText = Scene.root.find('text1');
const comments = LiveStreaming.comments;
const matchStrings = ['cat','dog'];
const isCaseSensitive = false;

var leadingCount = 0;

comments.startMatchCounter(matchStrings,isCaseSensitive).subscribe(
function(result) {
    for (var key in result) {
        if (result[key] > leadingCount) {
            matchCounterText.text = key;
            leadingCount = result[key];
        }
    }
});
Harry
  • 1,021
  • 4
  • 21
  • 41

1 Answers1

0

Facebook allows you to go LIVE for a Specific set of friends.

Under Live Settings > See More > Specific friends > Select a friend who can help you test live reactions and comments

Nithin NS
  • 51
  • 6