• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Logs that show how many people watched a certain stream

New Here ,
Jul 25, 2013 Jul 25, 2013

Copy link to clipboard

Copied

Hello,

I apoligize if that has been asked and and answered before.

I recently got a request to see how many people watched a paticular stream. Now I don't really know much about FMS. We are running FMS 3.5 and I set it up many years ago and have not touched it since.

I am just wondering if their is any easy way to determine how many people watched a stream.

Thanks

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 31, 2013 Jul 31, 2013

Copy link to clipboard

Copied

Try admin api

function timer1(){

    nc_admin.call("getLiveStreams", new onGetLiveStreams(), appName);

}

function onGetLiveStreams() {

    this.onResult = function(ans) {

     for (i = 0; i < ans.data.length; i++){

         nc_admin.call("getLiveStreamStats", new onGetLiveStreamStats(), appName , ans.data);

     }

    }

}

function onGetLiveStreamStats(){

    this.onResult = function(info) {

         if (info.data.publisher){

            trace("info.data.name = " + info.data.publisher.name);

        }

           if (info.data.subscribers){

               //how many people watched a stream.

               trace("info.data.subscribers.length = " + info.data.subscribers.length);

        }

    }

}

application.onAppStart = function (){

    nc_admin.connect("rtmp://localhost:1111/admin", "admin_login", "admin_pass");

    setInterval(timer1, 15000);

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 06, 2013 Aug 06, 2013

Copy link to clipboard

Copied

How would one implement these functions to display the current number of users watching a stream? I haven't used actionscript very much. Is there a way to display the number of users in the strobe media player?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 06, 2013 Aug 06, 2013

Copy link to clipboard

Copied

You can try to use these calls on client side.

Also you can send subscribers.length from AMS to your server via LoadVars and read this value from your server.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 06, 2013 Aug 06, 2013

Copy link to clipboard

Copied

I'm trying to use the admin api but I keep receiving error: netconnection.admin.commandfailed. I've verified the admin username and password are correct.

Is this the correct syntax to use? For example if I was trying to getUsers on this event.

My event path is : "C:\FMS\applications\livepkgr\_definst_\baseball"

In Internet Explorer I enter the following URL: http://localhost:1111/admin/getUsers?auser=admin&apswd=password&appInst="livepkgr/baseball/"

Thanks for the help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 06, 2013 Aug 06, 2013

Copy link to clipboard

Copied

Make sure under C:\Adobe Media Server 5\conf\Users.xml you have

-

And your server restarted after this edit.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 06, 2013 Aug 06, 2013

Copy link to clipboard

Copied

Not sure what I'm supposed to have? Did you leave some information out?

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 06, 2013 Aug 06, 2013

Copy link to clipboard

Copied

-<AdminServer>

-<HTTPCommands>

<Enable>${USERS.HTTPCOMMAND_ALLOW}</Enable>

<Allow>getUsers</Allow>

<Deny>All</Deny>

<Order>Deny,Allow</Order>

</HTTPCommands>

</AdminServer>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 06, 2013 Aug 06, 2013

Copy link to clipboard

Copied

Thanks. I checked and I already have those admin command permissions defined. Would this be the correct syntax to issue an admin command for my event called 'baseball'?

My event path is : "C:\FMS\applications\livepkgr\_definst_\baseball"

In Internet Explorer I enter the following URL: http://localhost:1111/admin/getUsers?auser=admin&apswd=password&appInst="livepkgr/baseball/"

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 06, 2013 Aug 06, 2013

Copy link to clipboard

Copied

LATEST

Quotes aren’t mandatory - http://localhost:1111/admin/getUsers?auser=admin <http://localhost:1111/admin/getUsers?auser=admin&apswd=amspass&appInst=livepkgr/_definst_/baseball> &apswd=amspass&appInst=livepkgr/_definst_/baseball. Apart from that, physical folder location doesn’t always map to RTMP address you use when connecting.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines