BigBlueButton getMeetings from angular

706 views Asked by At

I tried to getMeetings from AngularJs, like this one:

.factory('videoConf', function ($resource) {
        return $resource('http://192.168.56.101/bigbluebutton/api/getMeetings?random=&checksum=a41da4221d093acc8b35a69de2cf0cdef443126a', {}, {
              'get': {
               method: 'JSONP',
               isArray: false,
               transformResponse: function (data) {
                    data = xml2json(data, "");
                    data = angular.fromJson(data);
                    return data;
                }
            }

In this case - error:Uncaught SyntaxError: Unexpected token <

I tried used method "GET":

'get': {
                method: 'GET',
                isArray: false,
                transformResponse: function (data) {
                    data = xml2json(data, "");
                    data = angular.fromJson(data);
                    return data;
                }
            }

And in this case error: XMLHttpRequest cannot load

Please help - how i must doing request "getMeetings"?

1

There are 1 answers

0
Dharmesh On

Direct AngularJs client side calls may not work(if BBB on other domain) because of same-origin policy.

Also BBB API response is not in Json(its in xml ) hence jsonp may fail.

However, you can easily get getMeetings API response by making server side call we tried this using PHP calls.