简体   繁体   中英

How to test the livestreaming with spark AR studio

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];
        }
    }
});

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM