+-

Author Topic: Imvu voice chat  (Read 670 times)

PATRON

  • Trade Count: (0)
  • Civilian
  • *
  • Posts: 2
  • Karma: +0/-0
  • Dush
    • View Profile
Imvu voice chat
« on: January 03, 2018, 04:24:19 pm »
is there a way for custom client with voice chat drivers to public users ?
 :/ :/ :/

Bytes

  • Trade Count: (0)
  • Administrator
  • Lags
  • *
  • Posts: 10206
  • Karma: +40/-1
    • View Profile
Re: Imvu voice chat
« Reply #1 on: January 03, 2018, 05:34:30 pm »
Let me look into it. i need to figure out what client was the last client that had that and redirect the voice chat to a private server. cause that was a server it connected to to voice chat.

Bytes

  • Trade Count: (0)
  • Administrator
  • Lags
  • *
  • Posts: 10206
  • Karma: +40/-1
    • View Profile
Re: Imvu voice chat
« Reply #2 on: January 03, 2018, 06:07:57 pm »
I don't think its possible because the API's that consistence before are no longer there. i could keep looking into it :)


Quote
function VoiceProduct(productObject, imvuCall, voiceTestController, vivoxControl, myFonts) {
    this.vivoxControl = vivoxControl;
    this.voiceTestController = voiceTestController;
    this.imvuCall = imvuCall;
    this.data = productObject;
    this.element = IMVU.Client.widget.ProductBase.template.cloneNode(true);
   
    this.elName = IMVU.Client.xpath.getFirstElement("descendant::div[@class='info']/h3", this.element);
    this.elPrice = IMVU.Client.xpath.getFirstElement("descendant::div[@class='price']", this.element);
    this.elThumb = IMVU.Client.xpath.getFirstElement("descendant::div[@class='info']/div[@class='thumb clickable']/img", this.element);
    this.elTryX = IMVU.Client.xpath.getFirstElement("descendant::div[@class='try-x clickable']", this.element);
    this.elTryOn = IMVU.Client.xpath.getFirstElement("descendant::div[@class='try clickable']", this.element);
    this.elBuy = YAHOO.util.Selector.query(".buy.clickable", this.element, true);
   
    this.elName.innerHTML = this.data.displayName;
    this.elPrice.innerHTML = this.data.price;
    this.elThumb.src = 'img/voice_font_icon_100x80.png'; //this.data.displayImage;

    this.imvuCall('log', 'vivoxId: '+ this.data.vivoxId);
    this.imvuCall('log', 'name: '+ this.data.displayName);
    this.imvuCall('log', 'myFonts: '+ YAHOO.lang.JSON.stringify(myFonts));
    if (myFonts.indexOf(this.data.vivoxId) != -1) {
        this.setOwned(true);
    }
   
    YAHOO.util.Dom.addClass(this.element, 'tryable');   
   
    YAHOO.util.Event.on(this.elTryOn, 'click', bind(this, this.clickTryOn));
    YAHOO.util.Event.on(this.elBuy, 'click', this.clickBuy, this, true);   

    this.buyClicked = new YAHOO.util.CustomEvent("buyClicked");
}

VoiceProduct.prototype = {
    clickTryOn : function(e) {
        IMVU.log( 'clickTry, channel_uri: ' +  this.vivoxControl.channel_uri );
   
        this.vivoxControl.setVoiceFont(this.data.vivoxId);
        this.voiceTestController.spawnTestWindow();
    },   
    clickTakeOff : function(e) {
        this.vivoxControl.setVoiceFont(0);
    },
    clickBuy: function() {
        this.buyClicked.fire(this.data);
    },
    setOwned: function(v) {
        if (v) {
            YAHOO.util.Dom.addClass(this.element, "in-inventory");
        } else {
            YAHOO.util.Dom.removeClass(this.element, "in-inventory");
        }
    }
};

/*jslint forin: true */
function VoiceMode(baseDiv, paginatorDiv, moreHardwareDiv, vivoxControl, kwargs) {

    var voicetestShim = document.createElement('span');
    YAHOO.util.Dom.setStyle(voicetestShim, 'display', 'none');
   
    this.vivoxControl = vivoxControl;
    this.voiceTestController = new VoicetestController(voicetestShim, this.vivoxControl, false);
       
    this.vivoxControl.startVivox(bind(this, this.onVivoxLoginResult));

    this.baseDiv = baseDiv;
    this.paginatorDiv = paginatorDiv;
    this.imvuCall = kwargs.imvuCall;
    this.net = kwargs.network;
    this.eventBus = kwargs.eventBus;
    this.url = IMVU.SERVICE_DOMAIN +
'/api/voice.php';
    this.paginatorDiv = paginatorDiv;
    this.moreHardwareDiv = moreHardwareDiv;

    if(parseInt(kwargs.perPage,10)>0) {
        this._itemsPerPage = parseInt(kwargs.perPage,10);
    } else {
        this._itemsPerPage = 8;
    }

    this._setupTopLevelTabs();
   
    this.setIsLoading(true);
    this.myFonts = [];
    this.vivoxControl.getSessionFonts(bind(this, this.handleVoiceFonts));

    var searchMoreHardware = new ImvuButton(
        this.moreHardwareDiv,
        {
            callback: function () { IMVU.Client.EventBus.fire('VoiceMode.SearchMoreAmazonClicked', {}); },
            scope: this,
            grey: false
        }
    );
   
    YAHOO.util.Event.on(
        ['voice_settings', 'voice_test_call'],
        'click',
        function() {
               IMVU.Client.EventBus.fire('VoiceMode.SettingsClicked', {});
        }
    );

    IMVU.Client.util.turnLinksIntoLaunchUrls('voice_faq', this.imvuCall);
}

VoiceMode.prototype = {

    _dbg: function(t) {
        this.imvuCall('showErrorDialog', 'what', t);
    },

    handleVoiceFonts: function(fonts){
        for each (var f in fonts){
            this.myFonts.push(f.ParentID);
        }

        this._getData();
    },
   
    setIsLoading: function(state) {
        var e = document.getElementById("loading-mask");
        if (state) {
            YAHOO.util.Dom.addClass(e, "visible");
        } else {
            YAHOO.util.Dom.removeClass(e, "visible");
        }
    },

    _getData: function() {
        var self = this;
        var cb = {
            success: function(o) {
                var data = null;
                try {

                    data = YAHOO.lang.JSON.parse(o.responseText);
                    self._onDataComplete(data);

                } catch (e) {
                    if (e.constructor != SyntaxError) {
                        throw e;
                    }
                }
            },
            failure: function(o) {
                self.imvuCall('showErrorDialog', 'Please Try Again', 'There was a network problem loading the voice effect store.');
                self.imvuCall('endDialog', {});
            }
        };
               
        this.net.asyncRequest('GET', this.url, cb);   
    },
   
    _onDataComplete: function(data) {
       
        this._data = [];
   
        for each (var entry in data) {
            this._data.push(entry);
        }

        this._totalPages = parseInt(this._data.length/this._itemsPerPage,10);
        if(this._data.length%this._itemsPerPage) {
            this._totalPages++;
        }

        this.paginator = new Paginator(this.paginatorDiv, 1, this._totalPages);
        this.paginator.evtClick.subscribe(bind(this, this.handlePaginatorClick));
        this.onCompletePageLoad(1);
        this.setIsLoading(false);
    },
   
    handlePaginatorClick: function(evtData) {
        this.onCompletePageLoad(evtData.page);
    },

    _setupTopLevelTabs: function() {
        var tabs = YAHOO.util.Selector.query("li.tab", 'tabs_main');
        if (tabs.length) {
            YAHOO.util.Event.on(
                tabs,
                'click',
                function() {
                    if(YAHOO.util.Dom.hasClass(this, 'selected')) {
                        return;
                    }
                    var a = ['tab_voice_fonts','tab_hardware','voice_fonts','hardware'];
                    for (var i in a) {
                        YAHOO.util.Dom.removeClass(a, 'selected');
                    }
                    YAHOO.util.Dom.addClass(this.id.replace(/tab_/g, ''), 'selected');       
                    YAHOO.util.Dom.addClass(this, 'selected');
                    // FIXME: IMVU.Client.EventBus.fire('VoiceMode.ReloadAd', {});
                }
            );       
        }
    },
   
    onCompletePageLoad: function(pageNum) {
       
        this.baseDiv.innerHTML = '';
        this.currentProducts = [];
       
        var startIdx = (pageNum-1) * this._itemsPerPage;
        var endIdx = startIdx + this._itemsPerPage;
        if(endIdx > this._data.length) {
            endIdx = this._data.length;
        }

        for(var i=startIdx; i<endIdx; i++) {
            var vp = new VoiceProduct(this._data, this.imvuCall, this.voiceTestController, this.vivoxControl, this.myFonts);
            vp.buyClicked.subscribe(bind(this, this.onBuyClicked));
            vp.element.id = 'voice_product_'+(i-startIdx);
            this.currentProducts.push(vp);
            this.baseDiv.appendChild(this.currentProducts[i-startIdx].element);
        }
        this.paginator.update(pageNum,this._totalPages);
    },
   
    onVivoxLoginResult: function(success) {
        var self = this;
        this.voiceTestController.handleVivoxStartResult(success);
        this.vivoxControl.getSessionFonts(
            function(){
                bind(self, self.voiceTestController.handleVivoxStartResult(success) );
            }
        );
    },

    onNetworkError: function() {
        this.imvuCall('showErrorDialog', 'Please Try Again', 'There was a network problem with your purchase');
    },

    onBuyClicked: function(eventType, args) {
        voiceFont = args[0];

        var credits = parseInt(this.imvuCall('getCreditBalance'), 10);
        var predits = parseInt(this.imvuCall('getPromoBalance'), 10);       
        if(voiceFont.price > (credits + predits)) {
            this.imvuCall(
                'showConfirmationDialog',
                'Insufficient Credit Balance',
                'You do not have enough credits to purchase this voice effect.'
            );
            return;
        }

        if(!this.imvuCall('showYesNoDialog', 'Confirm purchase', 'Are you sure you want to buy ' + voiceFont.displayName + '?  It will cost ' + voiceFont.price + ' credits')) {
            return;
        }
        this.setIsLoading(true);
        url = IMVU.SERVICE_DOMAIN +
'/api/voice_font_purchase.php';
        var self = this;
        var cb = {
            success: function(o) {
                var data = o.responseText;
                self.setIsLoading(false);
                if (data.result != 'success') {
                    self.onNetworkError();
                } else {
                    IMVU.Client.EventBus.fire('NewVoiceFont', {ID:voiceFont.vivoxId});
                    self.myFonts.push(voiceFont.vivoxId);
                    for each (var product in self.currentProducts) {
                        if (product.data.vivoxId==voiceFont.vivoxId) {
                            product.setOwned(true);
                            break;
                        }
                    }
                    credits = self.imvuCall('getCreditBalance');
                    predits = self.imvuCall('getPromoBalance');
                    IMVU.Client.EventBus.fire('updateCreditBalances', { credits: credits - voiceFont.price, predits:  predits });
                    self.imvuCall('showConfirmationDialog', 'Success', 'You spent ' + voiceFont.price + ' on ' + voiceFont.displayName);
                }
            },
   
            failure: function(o) {
                self.setIsLoading(false);
                self.onNetworkError();
            }
        };

        this.net.asyncRequest('POST', url, cb, {voicefont_id: voiceFont.vivoxId}, true); 
    }
};

IMVU.Client.widget.ProductBase.createTemplate();

Bytes

  • Trade Count: (0)
  • Administrator
  • Lags
  • *
  • Posts: 10206
  • Karma: +40/-1
    • View Profile
Re: Imvu voice chat
« Reply #3 on: January 09, 2018, 07:56:24 pm »
~This Topic has been moved to Discussions~

trukhronik

  • Trade Count: (0)
  • Civilian
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Imvu voice chat
« Reply #4 on: March 09, 2018, 09:01:46 pm »
THAT WOULD BE LIT IF THERE 1 U CAN VID CHAT OR HAVE LIKE SOMTHING THT CAN TELL U IF THT PERSON IS CATFISHIN 

trukhronik

  • Trade Count: (0)
  • Civilian
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Imvu voice chat
« Reply #5 on: March 09, 2018, 09:46:27 pm »
we need tht

 

Recent Post

LAGS IMVU T3DE by Bytes
May 19, 2020, 02:06:11 am

IMVU Checker by Bytes
May 13, 2020, 09:20:36 pm

Discord system by Bytes
May 13, 2020, 09:10:03 pm

IMVU Room Finder by Bytes
April 24, 2020, 01:42:36 am

Smacked Shops by Bytes
March 15, 2020, 03:03:40 pm

NULL IS BACK! by Bytes
March 04, 2020, 12:02:42 am

Hey lags Answer this one/ Cannot be reported? by Bytes
February 29, 2020, 10:46:50 am

Free hacked client by maklan4447
December 16, 2019, 10:02:12 am

Lags Chkn Editor & Encryptor by Bytes
December 09, 2019, 10:23:10 pm

What can i do next to the site for yall? by Uceman
November 29, 2019, 01:34:37 pm