X
Select Your Camera Options



Send Your Video
x
  Girl - Straight
  Girl - Lesbian
  Couple - Hetero
  Couple - Lesbian
  Mature
  Voluptuous
  Transgender
  Fetish
  Boy - Straight
  Boy - Gay
  Couple - Gay
  Group Cam
  Caucasian
  Hispanic
  Asian
  Black
  Middle Easterner
  Pacific Islander
  Native American
  Other
the most affordable live sex cams
x -
Chat Window
0:00:00
live
Welcome to the ChatRoom!
en
q w e r t y u i o p
a s d f g h j k l
z x c v b n m
123 ,   .
\ \
\ \ \ \
\ \
\
\ \ \
\
\ \
\
\ \ \
live
\
click to enter
\ \
\ '; var perfcard_online_temp = ''; $('#performers_nr_text').html(performers.length); var temptext=''; var appended=0; var already=0; var canadd=1; for (i = 0; i \ \
\ PERF_US\
\ \
\ \ \ \
\ \
\
\ \ \
\
\ \
\
\ \ \
live
\
click to enter
\ \ \ '; var perfcard_online_temp = ''; var temptext=''; var inserted=0; var inserted_username=''; var already=0; for (i = 0; i 0) { $('#div_middle').append(temptext); console.log('New performer inserted: '+inserted_username); if ((can_update_models==1) || (forceupdate==1) || (current_option_refresh=='1')) { mixer.mixItUp('sort', sort_string); } } $('#performers_nr_text').html(performers.length); return(inserted); } function performers_remove(whatusername, forceupdate) { console.log('performers_remove: '+whatusername); if (((current_option_refresh=='3') && (chat_maximized!=1)) && (forceupdate!=1)) return; // detach chat or preview if needed if (current_performer_username==whatusername) { console.log('remove current_performer, detached'); detach_chat(1); } if (current_preview_username==whatusername) { console.log('remove current_preview, detached'); detach_preview(1); } if (current_performer_username==whatusername) chat_maximized=0; // remove form array for (i = 0; i normal', current_type, 'modal', '100%', '0.6'); chat_maximizing=0; return; } detach_preview(1); $('#chat_div').css({'z-index' : '5000'}); if (withdetach==1) detach_chat(0); $('#chat_div').css({'position' : 'fixed'}); $('#chat_div').css({'border' : '0px'}); //$('#chat_overlay_border').fadeOut(300); if (chat_maximized==0) { // reposition video after detach, to prepare for the zoom effect var temp_top2 = $('#chat_div').position().top-$(document).scrollTop(); $('#chat_div').css({'top' : temp_top2 + 'px'}); $('#chat_overlay').hide(); } chat_maximized=1; chat_maximizing=0; send_webrtc_message(current_performer_username, 'maximized'); last_preview_start_time=0; $('#chat_div').stop().animate({ top: '0px', left: '0px', width: '100%', height: '100%', opacity: '1' }, { duration: 300, step: function(now, fx) { scale_chat(); }, complete: function() { if (chat_maximized==1) { fit_video($('#video_'+current_performer_id)); fit_image(); $('#div_top').addClass('scrollUp'); stop_scrolling(); $('#chat_overlay').css({'width' : $('#chat_div').width()+'px'}); $('#chat_overlay').css({'height' : $('#chat_div').height()+'px'}); scale_chat(); $('#chat_overlay').fadeIn(1000); last_chat_mousemove_time=new Date().getTime(); last_chat_mousemove_time_top=new Date().getTime(); last_chat_mousemove_time_right=new Date().getTime(); chatoverlay('top', 'show'); } } }); //console.log('chat maximized'); horizontal_menu_hide(); if ((current_performer_id != '') && (current_performer_id != null)) log_connect_to_performer(current_performer_id); load_tooltips(); } function minimize_chat(withplay) { chat_maximized=2; $('#chat_div').css({'border' : '1px solid #ffffff'}); $('#chat_div').animate({ top: '59%', left: '59%', width: '40%', height: '40%', opacity: '1' }, { step: function(now, fx) { scale_chat(); }, complete: function() { if (scrolling_disabled==1) start_scrolling(); if ($(window).scrollTop()normal', current_type, 'modal', '100%', '0.6'); return; } if (chat_maximized==0) { maximize_chat(1, 100); $('#live_sign_'+current_preview_username).hide(); return; } if (chat_maximized==2) { maximize_chat(0, 101); return; } if (chat_maximized==1) { return; } e.preventDefault(); }); function preview_switch() { webrtc_stop_by_username(current_performer_username,1); $('#live_sign_'+current_preview_username).hide(); current_performer_username=current_preview_username; current_preview_username=''; current_performer_id=current_preview_id; current_preview_id=0; chatarea_reset(); $('#video_'+current_performer_id).insertBefore($('#show_stats')); fit_video($('#video_'+current_performer_id)); fit_image(); maximize_chat(0, 102); } function putchatback() { // put chat window back $('#chat_div').animate({ top: '59%', left: '59%', width: '40%', height: '40%', opacity: '1' }, { step: function(now, fx) { scale_chat(); }, complete: function(){ } }); } $('#chat_div').on('touchstart', function(e){ $('#chat_div').focus(); if ((chat_maximized==2) || (chat_maximized==1)) { if (e.changedTouches) { touch_startx = e.changedTouches[0].clientX; touch_starty = e.changedTouches[0].clientY; } else { touch_startx = e.screenX; touch_starty = e.screenY; } chat_left_start = $('#chat_div').offset().left; chat_top_start = $('#chat_div').position().top; chat_width_start = $('#chat_div').width(); chat_height_start = $('#chat_div').height(); chat_aspect_ratio = chat_width_start/chat_height_start; } }); $('#chat_div').on('touchmove', function(e){ if (chat_maximized!=0) // prevent page scroll e.preventDefault(); if (chat_maximized==2) { if (e.changedTouches) { var differencehor = touch_startx-e.changedTouches[0].clientX ; var differencever= touch_starty-e.changedTouches[0].clientY ; } else { var differencehor = touch_startx-e.screenX; var differencever= touch_starty-e.screenY ; } // determine direction if not already set if (drag_direction==0) { if ((differencehor>5) || (differencehor-5)) // not moved vertically drag_direction = 1; else drag_direction = 2; } else { if ((differencever>5) || (differencever0) // swiped to the left { var currentdragx = $('#chat_div').offset().left; var percentdraggedx = currentdragx/(totaldragx/100); $('#chat_div').css({'opacity' : (20+percentdraggedx)/100}); } else // swiped to the right { var percentdraggedx = (differencehor*-1)/(parseInt($('#chat_div').width())/100); $('#chat_div').css({'opacity' : (120-percentdraggedx)/100}); } } if (drag_direction == 2) { $('#chat_div').css({'top' : chat_top_start-differencever}); $('#chat_div').css({'height' : chat_height_start+differencever}); $('#chat_div').css({'left' : chat_left_start-(differencever*chat_aspect_ratio)}); $('#chat_div').css({'width' : chat_width_start+(differencever*chat_aspect_ratio)}); scale_chat(); } } if (chat_maximized==1) { if (e.changedTouches) { var differencehor = touch_startx-e.changedTouches[0].clientX ; var differencever= touch_starty-e.changedTouches[0].clientY ; } else { var differencehor = touch_startx-e.screenX; var differencever= touch_starty-e.screenY ; } // determine direction if not already set if (drag_direction==0) { if ((differencehor>10) || (differencehor-5)) // not moved vertically drag_direction = 1; else drag_direction = 2; } else { if ((differencever>5) || (differencever0)) { e.preventDefault(); return; } differencever=differencever*1.5; // maximize swipe up if (drag_direction == 1) { // maybe implemet swipe to go to next chat } if (drag_direction == 2) { $('#chat_div').css({'top' : chat_top_start-differencever}); $('#chat_div').css({'height' : chat_height_start+differencever}); $('#chat_div').css({'left' : chat_left_start-(differencever*chat_aspect_ratio)}); $('#chat_div').css({'width' : chat_width_start+(differencever*chat_aspect_ratio)}); scale_chat(); } } }); $('#chat_div').on('touchend', function(e){ if (chat_maximized==2) { if (e.changedTouches) { var differencehor = touch_startx-e.changedTouches[0].clientX ; var differencever= touch_starty-e.changedTouches[0].clientY ; } else { var differencehor = touch_startx-e.screenX; var differencever= touch_starty-e.screenY ; } var maxwidth = $(window).width(); var maxheight = $(window).height(); if (drag_direction==1) { if (differencehor>0) // swiped to the left { if (differencehor(maxheight/5.5)*-1) { maximize_chat(0, 104); } else { // put chat window back minimize_chat(0); } } } drag_direction = 0; if (chat_maximized==1) { if (e.changedTouches) { var differencehor = touch_startx-e.changedTouches[0].clientX ; var differencever= touch_starty-e.changedTouches[0].clientY ; } else { var differencehor = touch_startx-e.screenX; var differencever= touch_starty-e.screenY ; } if (differencehor40) chat_next(); } }); $('#chatarea').on('mousewheel', function(e){ last_chat_scroll_time=new Date().getTime(); }); $('#chat_div').on('mousemove', function(e){ last_chat_mousemove_time=new Date().getTime(); if (event.pageX0) // if touch down { var scrolltop = $('#chatarea')[0].scrollTop; var scrolldifference= $('#chatarea')[0].scrollHeight - $('#chatarea')[0].offsetHeight; if (scrolltop>=scrolldifference) { e.preventDefault(); return; } } e.stopPropagation(); }); $('#chatarea').on('touchend', function(e){ e.stopPropagation(); }); $('#chat_close').mouseup(function(e) { e.stopPropagation(); e.preventDefault(); if (chat_maximized==1) { //minimize_chat(1); close_chat(current_chat_appcounter); return; } if (chat_maximized==2) { // hide chat window to the left side hide_chat_to_left(); } }); $('#chat_minimize').mouseup(function(e) { e.stopPropagation(); e.preventDefault(); if (chat_maximized!=2) minimize_chat(0); else maximize_chat(0, 110); }); $('#chat_prev').mouseup(function(e) { e.stopPropagation(); e.preventDefault(); chat_prev(); }); $('#chat_next').mouseup(function(e) { e.stopPropagation(); e.preventDefault(); chat_next(); }); $('#search_close').mouseup(function(e) { e.stopPropagation(); e.preventDefault(); $('#search').val(''); search_changed(); hidefilter(); }); $('#sort').change(function() { last_filter_mousemove_time=new Date().getTime(); var selected_val=$('#sort option:selected').val(); if (selected_val=='name') { if (current_option_favtotop==1) sort_string='favorite:desc username:asc'; else sort_string='username:asc'; } if (selected_val=='top') { if (current_option_favtotop==1) sort_string='favorite:desc top:desc'; else sort_string='top:desc'; } if (selected_val=='age') { if (current_option_favtotop==1) sort_string='favorite:desc age:asc top:desc'; else sort_string='age:asc top:desc'; } if (selected_val=='popularity') { if (current_option_favtotop==1) sort_string='favorite:desc stars:desc top:desc'; else sort_string='stars:desc top:desc'; } if (selected_val=='newest') { if (current_option_favtotop==1) sort_string='favorite:desc new:desc top:desc'; else sort_string='new:desc top:desc'; } if (selected_val=='quality') { if (current_option_favtotop==1) sort_string='favorite:desc resolution:desc fps:desc'; else sort_string='resolution:desc fps:desc'; } //console.log(sort_string); // scroll to top $(window).scrollTop(0); // sort performers array if (selected_val=='name') performers.sort(function(obj1, obj2) { return compareStrings(obj1.us, obj2.us); }); if (selected_val=='top') performers.sort(function(obj1, obj2) { return obj2.cr - obj1.cr; }); if (selected_val=='age') performers.sort(function(obj1, obj2) { return obj1.ag - obj2.ag; }); if (selected_val=='popularity') performers.sort(function(obj1, obj2) { return obj2.st - obj1.st; }); if (selected_val=='newest') performers.sort(function(obj1, obj2) { return obj2.ne - obj1.ne; }); if (selected_val=='quality') performers.sort(function(obj1, obj2) { return obj1.re - obj2.re; }); //for (i = 0; i { var connectionStats = ''; stats.forEach(report => { //console.log('X-'+report.type); if (report.type === 'track') { Object.keys(report).forEach(statName => { //console.log(report.kind+' - '+statName+':'+report[statName]); if (statName=='frameWidth') video_width=report[statName]; if (statName=='frameHeight') video_height=report[statName]; if (statName=='framesReceived') { framesdecoded=report[statName]; if (framesdecoded>0) { fps_sec=Math.round((framesdecoded-stat_last_framesdecoded).toFixed(4)); } } }); } if (report.type === 'inbound-rtp' ) { mediatype=''; Object.keys(report).forEach(statName => { //console.log(report.kind+' - '+statName+':'+report[statName]); if (statName=='mediaType') mediatype=report[statName]; if (mediatype=='video') { if (statName=='codecId') { if ((report[statName]=='RTCCodec_0_Inbound_102') || (report[statName]=='RTCCodec_0_Inbound_101') || (report[statName]=='RTCCodec_1_Inbound_102') || (report[statName]=='RTCCodec_1_Inbound_101')) codec='H264'; if ((report[statName]=='RTCCodec_0_Inbound_96') || (report[statName]=='RTCCodec_1_Inbound_96')) codec='VP8'; if ((report[statName]=='RTCCodec_0_Inbound_100') || (report[statName]=='RTCCodec_1_Inbound_100')) codec='MP4'; if ((report[statName]=='RTCCodec_0_Inbound_97') || (report[statName]=='RTCCodec_1_Inbound_97')) codec='VP8'; } if (statName=='framesDecoded') { framesdecoded=report[statName]; if (framesdecoded>0) { fps_sec=Math.round((framesdecoded-stat_last_framesdecoded).toFixed(4)); } } if (statName=='bytesReceived') { bytesreceived=report[statName]; if (bytesreceived>0) { bytesreceived_sec=(bytesreceived-stat_last_bytesreceived); } } connectionStats += statName+': '+report[statName]+'
'; } }); } }); kilobytesreceived_sec=Math.round(bytesreceived_sec/1024); $('#show_stats').html('Connection Stats

'+connectionStats+'
Connection: '+stat_ice_connection_state+'/'+stat_connection_state+'
Resolution: '+video_width+'x'+video_height+'
FPS: '+fps_sec+'
Codec: '+codec+'
Speed: '+kilobytesreceived_sec+' KBps

'); //$('#chat_overlay_top_network').html(kilobytessent_sec+' KBps'); //$('#chat_overlay_top_webcam').html(video_width+'x'+video_height+', '+fps_sec+' FPS'); stat_last_framesdecoded=framesdecoded; stat_last_bytesreceived=bytesreceived; }); } else { //$('#show_stats').html('Not Connected, '+'
Resolution: '+camera_width+'x'+camera_height+'
FPS: '+camera_fps); //$('#chat_overlay_top_network').html('0 Kbps'); //$('#chat_overlay_top_webcam').html(camera_width+'x'+camera_height+', '+Math.round(camera_fps)+' FPS'); } } // chat buttons $('.chatbutton').mouseup(function(e) { last_chat_mousemove_time=new Date().getTime(); last_chat_mousemove_time_right=new Date().getTime(); last_chat_mousemove_time_top=new Date().getTime()-10; //chatoverlay('top', 'hide'); }); $('#chatbutton_mute').mouseup(function(e) { e.preventDefault(); e.stopPropagation(); // console.log('video_'+current_performer_id); // console.log( $('#video_'+current_performer_id).length ); if ( $('#video_'+current_performer_id).prop('muted') ) { $('#video_'+current_performer_id).prop('muted', false); $('#chatbutton_mute').removeClass('fa-volume-mute').addClass('fa-volume-up'); } else { $('#video_'+current_performer_id).prop('muted', true); $('#chatbutton_mute').removeClass('fa-volume-up').addClass('fa-volume-mute'); } }); $('#chatbutton_streamdebug').mouseup(function(e) { e.preventDefault(); e.stopPropagation(); if ($('#show_stats').is(':visible')) $('#show_stats').hide(); else $('#show_stats').show(); }); $('#chatbutton_info').mouseup(function(e) { e.stopPropagation(); //show perfomer info - id, username, type (1-live, 0-offline) showPage('performer_info'+current_performer_id+''+current_performer_username+''+1, current_type, 'modal', '100%', '0.15'); }); $('#chatbutton_webcam').mouseup(function(e) { e.stopPropagation(); //showwebcam(); if (!$('#client_webcam_div').is(':visible')) { maximize_from_element_right($('#client_webcam_div'), $('#chatbutton_webcam'), 0, '10px', '60px'); if (!stream_prepared_c) startMedia_c(stream_constraints_active_c); } else { minimize_to_element_right($('#client_webcam_div'), $('#chatbutton_webcam'), 1); close_tooltips(); } }); $('#chatbutton_buzz').mouseup(function(e) { e.stopPropagation(); if ( !$('#chat_overlay_bottom').hasClass('shake') ) { shake($('#chat_overlay_bottom')); play_sound('buzz'); var temp_message = { 'type' : 'message', 'username' : current_username, 'ssid' : current_ssid, 'usertype' : 'client', 'msgtype' : 'client', 'recepient_username' : current_performer_username, 'recepient_chatgroup' : '', 'content' : '{buzz}' }; ChatMessageSend(temp_message); } else { $('#chat_overlay_bottom').removeClass('shake'); } }); $('#buzz_clients').mouseup(function(e) { e.stopPropagation(); if ( !$('#chat_overlay_bottom').hasClass('shake') ) { shake($('#chat_overlay_bottom')); play_sound('buzz'); var temp_message = { 'type' : 'message', 'username' : current_username, 'ssid' : current_ssid, 'usertype' : 'client', 'msgtype' : 'client', 'recepient_username' : current_performer_username, 'recepient_chatgroup' : '', 'content' : '{buzz}' }; ChatMessageSend(temp_message); } else { $('#chat_overlay_bottom').removeClass('shake'); } }); function perfcard_mouseenter(perfcard_el) { //console.log('mouseover'); last_mouseover_time=new Date().getTime(); mouse_over_model = 1; var temp_id=perfcard_el.attr('id'); var temp_username=perfcard_el.attr('data-username'); var temp_type=perfcard_el.attr('data-type'); var temp_app_server_port=perfcard_el.attr('data-port'); if (current_hover==temp_id) { //console.log('already hovering this: '+current_hover); return; } if (!perfcard_el.hasClass('offline_model')) $('#chat_overlay_border').removeClass('pulsating'); current_hover=temp_id; if ((logged_in==0) && (!gc(current_country))) return; if (perfcard_el.hasClass('offline_model')) return; //if (is_scrolling==1) //return; // wait while scrolling var timetowait=5000; var timeelapsed=0; async function delayedAttach() { while ((timeelapsednormal', current_type, 'modal', '100%', '0.6'); return; } console.log('perfcard_click '+temp_username); if (temp_type==1) return; if (chat_maximized==0) { $('#live_sign_'+current_preview_username).hide(); speedup_connection = 1; attach_chat(temp_id, temp_username, temp_type, temp_app_server_port, 1, 0); maximize_chat(1, 300); return; } if (chat_maximized==2) { if ($('#no_preview_'+temp_username).is(':visible')) { $('#live_sign_'+current_preview_username).hide(); speedup_connection = 1; attach_chat(temp_id, temp_username, temp_type, temp_app_server_port, 1, 0); maximize_chat(1, 300); current_preview_id=0; current_preview_username=''; return; } else return; return; // BUG at rapid click on preview when chat_maximized=2 $('#live_sign_'+current_preview_username).hide(); webrtc_stop_by_username(current_performer_username); speedup_connection = 1; attach_chat(temp_id, temp_username, temp_type, temp_app_server_port, 1, 0); maximize_chat(1, 300); current_preview_id=0; current_preview_username=''; return; } if (chat_maximized==1) { return; } } function perfcard_performer_name_click(perfcard_el) { } function perfmessage_click(current_performerinfo_id, current_performerinfo_username, perfislive, mustbackonclose) { if(event.stopPropagation){event.stopPropagation();}event.cancelBubble=true; event.preventDefault(); if (current_creditMessage!', 'Although they are offered for free, offline messages are only available to members with credit.
Please '+''+'purchase some credit'+''+' first, to avoid this limitation.', current_type, 0.75, 12000); return; } if (mustbackonclose==1) backonclose = 1; showPage('messages'+current_performerinfo_id+''+current_performerinfo_username, current_type, 'modal', '100%', '0.75'); } function perfinfo_click(perfcard_el) { if(event.stopPropagation){event.stopPropagation();}event.cancelBubble=true; event.preventDefault(); var current_performerinfo_id=perfcard_el.attr('id'); var current_performerinfo_username=perfcard_el.attr('data-username'); var current_performerinfo_type=perfcard_el.attr('data-type'); showPage('performer_info'+current_performerinfo_id+''+current_performerinfo_username+''+current_performerinfo_type, current_type, 'modal', '100%', '0.75'); } function perffavorite_click(perfcard_el) { if(event.stopPropagation){event.stopPropagation();}event.cancelBubble=true; event.preventDefault(); var performer_id=perfcard_el.attr('id'); var temp_is_favorite = 0; if ($('#button_perf_favorite_'+performer_id).hasClass('fas')) temp_is_favorite = 1; var tempurl=''; if (temp_is_favorite==0) tempurl = '/php/_action.php?ssid='+current_ssid+'&action=add_to_favorites&performer_id='+performer_id; else tempurl = '/php/_action.php?ssid='+current_ssid+'&action=remove_from_favorites&performer_id='+performer_id; $.get(tempurl, function(data) { $('#div_hidden').html(data); if (data=='removed') { $('#button_perf_favorite_'+performer_id).removeClass('fas').addClass('fal'); pop($('#button_perf_favorite_'+performer_id)); $('#button_perf_favorite_'+performer_id).attr('data-tipso', tr('Add to Favorites')); $('#button_perf_favorite_'+performer_id).tipso('update', 'content', tr('Add to Favorites')); $('#button_perf_favorite_'+performer_id).tipso('close'); setTimeout(() => { if ($('#button_perf_favorite_'+performer_id+':hover').length != 0) $('#button_perf_favorite_'+performer_id).tipso('show'); }, 300); perfcard_el.attr('data-favorite', '0'); } if (data=='added') { $('#button_perf_favorite_'+performer_id).removeClass('fal').addClass('fas'); pop($('#button_perf_favorite_'+performer_id)); $('#button_perf_favorite_'+performer_id).attr('data-tipso', tr('Remove from Favorites')); $('#button_perf_favorite_'+performer_id).tipso('update', 'content', tr('Remove from Favorites')); $('#button_perf_favorite_'+performer_id).tipso('close'); setTimeout(() => { if ($('#button_perf_favorite_'+performer_id+':hover').length != 0) $('#button_perf_favorite_'+performer_id).tipso('show'); }, 300); perfcard_el.attr('data-favorite', '1'); } }); } function perfban_click(perfcard_el) { if(event.stopPropagation){event.stopPropagation();}event.cancelBubble=true; event.preventDefault(); var performer_id=perfcard_el.attr('id'); var performer_username=perfcard_el.attr('data-username'); tempurl = '/php/_action.php?ssid='+current_ssid+'&action=ban&performer_id='+performer_id; $.get(tempurl, function(data) { $('#div_hidden').html(data); if (data=='banned') { close_tooltips(); current_banned_list=current_banned_list+performer_id+','; performers_remove(performer_username, 1); if ($('#button_perf_ban_'+performer_id+':hover').length != 0) $('#button_perf_ban_'+performer_id).tipso('hide'); } }); } function handleSuccess_c(mediaStream) { stream_prepared_c = window.stream_prepared_c = mediaStream; video1.srcObject = stream_prepared_c; video_track_c = mediaStream.getVideoTracks()[0]; audio_track_c = mediaStream.getAudioTracks()[0]; if (video_track_c) video_constraints_c = video_track_c.getConstraints(); if ((audio_track_c) && (send_audio==1)) { audio_constraints_c = audio_track_c.getConstraints(); console.log('with sound'); } else { console.log('no sound'); } console.log('Stream active with constraints:' + JSON.stringify(video_constraints_c)); if (video_track_c) console.log('Using video device: ' + video_track_c.label); if (audio_track_c) console.log('Using audio device: ' + audio_track_c.label); stream_prepared_c.oninactive = function() { console.log('Stream inactive'); //webrtc_stop(tempcounter); webrtc_stop_by_username(current_username); streaming_c=0; }; video_track_c.onstarted = function() { console.log('Track started'); }; video_track_c.onmute = function() { console.log('Track muted'); }; video_track_c.onunmute = function() { console.log('Track unmuted'); }; video_track_c.onoverconstrained = function() { console.log('Track overconstrained'); }; video_track_c.onended = function() { console.log('Track ended'); }; // Refresh button list in case labels have become available if (navigator.mediaDevices && typeof navigator.mediaDevices.enumerateDevices === 'function') { navigator.mediaDevices.enumerateDevices(). then(gotDevices_c). catch(handleError_c); } } function handleError_c(error) { if (error.name === 'ConstraintNotSatisfiedError') { toastr.warning(tr('The resolution')+' ' + stream_constraints_active.video.width + 'x' + stream_constraints_active.video.height + ' '+tr('px is not supported by your device.'),'',{timeOut: 5000, positionClass: 'toast-bottom-right', preventDuplicates: true }); } if (error.name === 'OverconstrainedError') { toastr.warning(tr('The resolution')+' ' + stream_constraints_active.video.width + 'x' + stream_constraints_active.video.height + ' '+tr('px is not supported by your device.'),'',{timeOut: 5000, positionClass: 'toast-bottom-right', preventDuplicates: true }); } if (error.name === 'PermissionDeniedError') { toastr.warning(tr('Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the page to work.'),'',{timeOut: 5000, positionClass: 'toast-bottom-right', preventDuplicates: true }); } if (error.name === 'NotAllowedError') { toastr.warning(tr('Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the page to work.'),'',{timeOut: 5000, positionClass: 'toast-bottom-right', preventDuplicates: true }); } if (error.name === 'NotReadableError') { toastr.warning(tr('Could not access your camera and microphone, please make sure the camera is not used by another webpage or application.'),'',{timeOut: 5000, positionClass: 'toast-bottom-right', preventDuplicates: true }); } console.log('getUserMedia error: ' + error.name, error); } $('#resolution_c').on('change', function(e){ var tempval = $(this).val(); if (tempval!='---') applyMedia_c(eval('Constraints'+tempval), null); }); function gotDevices_c(deviceInfos) { // Handles being called several times to update labels. Preserve values. var values = selectors_c.map(function(select) { return select.value; }); selectors_c.forEach(function(select) { while (select.firstChild) { select.removeChild(select.firstChild); } }); for (var i = 0; i !== deviceInfos.length; ++i) { var deviceInfo = deviceInfos[i]; var option = document.createElement('option'); option.value = deviceInfo.deviceId; if (deviceInfo.kind === 'audioinput') { option.text = deviceInfo.label || 'microphone ' + (audioInputSelect_c.length + 1); audioInputSelect_c.appendChild(option); } else if (deviceInfo.kind === 'audiooutput') { option.text = deviceInfo.label || 'speaker ' + (audioOutputSelect_c.length + 1); audioOutputSelect_c.appendChild(option); } else if (deviceInfo.kind === 'videoinput') { option.text = deviceInfo.label || 'camera ' + (videoSelect_c.length + 1); videoSelect_c.appendChild(option); } else { console.log('Some other kind of source/device: ', deviceInfo); } } selectors_c.forEach(function(select, selectorIndex) { if (Array.prototype.slice.call(select.childNodes).some(function(n) { return n.value === values[selectorIndex]; })) { select.value = values[selectorIndex]; } }); } // Attach audio output device to video element using device/sink ID. function attachSinkId(element, sinkId) { if (typeof element.sinkId !== 'undefined') { element.setSinkId(sinkId) .then(function() { console.log('Success, audio output device attached: ' + sinkId); }) .catch(function(error) { var errorMessage = error; if (error.name === 'SecurityError') { errorMessage = 'You need to use HTTPS for selecting audio output ' + 'device: ' + error; } console.error(errorMessage); // Jump back to first output device in the list as it's the default. audioOutputSelect_c.selectedIndex = 0; }); } else { console.warn('Browser does not support output device selection.'); } } function changeAudioDestination() { var audioDestination = audioOutputSelect_c.value; attachSinkId(videoElement, audioDestination); } function startMedia_c(whatconstraints) { if (stream_prepared_c) { stream_prepared_c.getTracks().forEach(function(track) { track.stop(); }); } if (navigator.mediaDevices && typeof navigator.mediaDevices.enumerateDevices === 'function') { navigator.mediaDevices.enumerateDevices(). then(gotDevices_c). catch(handleError_c); } else toastr.warning (tr('Your browser does not support enumerateDevices.')+' '+tr('Please update your browser.'),'',{timeOut: 34000, positionClass: 'toast-bottom-right', preventDuplicates: true }); if (navigator.mediaDevices && typeof navigator.mediaDevices.getUserMedia === 'function') { // safely access `navigator.mediaDevices.getUserMedia` navigator.mediaDevices.getUserMedia(whatconstraints). then(handleSuccess_c). catch(handleError_c); } else toastr.warning (tr('Your browser does not support getUserMedia.')+' '+tr('Please update your browser.'),'',{timeOut: 34000, positionClass: 'toast-bottom-right', preventDuplicates: true }); } function stopMedia_c() { if (stream_prepared_c) { stream_prepared_c.getTracks().forEach(function(track) { track.stop(); }); stream_prepared_c=null; } } function applyMedia_c(what_video_constraints, what_audio_constraints) { if (stream_prepared_c) { if (what_video_constraints) { if (video_track_c) { video_track_c.applyConstraints(what_video_constraints).then(function() { }).catch(handleError_c); } else toastr.warning(tr('Please start your camera first.'),'',{timeOut: 3000, positionClass: 'toast-bottom-right', preventDuplicates: true }); } if ((what_audio_constraints) && (send_audio==1)) { if (audio_track_c) { audio_track_c.applyConstraints(what_audio_constraints).then(function() { }).catch(handleError_c); } else toastr.warning(tr('Please start your camera first.'),'',{timeOut: 3000, positionClass: 'toast-bottom-right', preventDuplicates: true }); } } else startMedia(stream_constraints_active_c); } video1.onloadedmetadata = function(e) { console.log('video metadata'); video1.play(); fit_video($('#cvideo'), $('#client_webcam_div')); take_snapshot(); if (current_username!='') save_snapshot(); }; videoSelect_c.onchange = source_change_c; audioInputSelect_c.onchange = source_change_c; function source_change_c() { var audioSource = audioInputSelect_c.value; var videoSource = videoSelect_c.value; var resolution = resSelect_c.value; var temp_width = 640; var temp_height = 360; if (resolution=='1') { temp_width=640; temp_height=360} if (resolution=='2') { temp_width=800; temp_height=448} if (resolution=='3') { temp_width=960; temp_height=540} if (resolution=='4') { temp_width=1280; temp_height=720} if (resolution=='5') { temp_width=1600; temp_height=896} if (resolution=='6') { temp_width=1920; temp_height=1080} if (resolution=='7') { temp_width=2560; temp_height=1440} if (resolution=='8') { temp_width=3840; temp_height=2160} var temp_constraints = { audio: { deviceId: audioSource ? { exact: audioSource } : undefined }, video: { width: temp_width, height: temp_height, frameRate: 30, deviceId: videoSource ? { exact: videoSource } : undefined } }; console.log('temp_constraints: '+temp_constraints); stopMedia(); //webrtc_stop(tempcounter); webrtc_stop_by_username(current_username); streaming_c=0; if (navigator.mediaDevices && typeof navigator.mediaDevices.getUserMedia === 'function') { navigator.mediaDevices.getUserMedia(temp_constraints). then(handleSuccess_c). catch(handleError_c); } else toastr.warning (tr('Your browser does not support getUserMedia.')+' '+tr('Please update your browser.'),'',{timeOut: 34000, positionClass: 'toast-bottom-right', preventDuplicates: true }); } document.getElementById('publish_btn_c').addEventListener('click', function() { // check if can start streaming if (camera_width==0) { toastr.warning(tr('Cannot start streaming, please make sure there are no issues with your camera.'),'',{timeOut: 5000, positionClass: 'toast-bottom-right', preventDuplicates: true }); return; } var streamingport = parseInt(best_server_app_server_port)+(current_id % 10); tempcounter = nextCounter(); app_connect(tempcounter, 'wss://new.extasycams.com:'+streamingport+'/app_server', best_server_app_server_port[2]); // wait for socket to connect before publishing through webrtc waitForSocketConnection(ws_app[tempcounter], function(){ webrtc_publish(document.getElementById('cvideo'), stream_prepared_c, tempcounter, best_server_app_server_port[2], 'client'); }); }); document.getElementById('terminate_c').addEventListener('click', function() { //webrtc_stop(tempcounter); webrtc_stop_by_username(current_username); stopMedia_c(); streaming_c=0; }); $('#btn_start_c').on('mouseup', function(e){ startMedia_c(stream_constraints_active); }); $('#btn_stop_c').on('mouseup', function(e){ stopMedia_c(); //webrtc_stop(tempcounter); webrtc_stop_by_username(current_username); close_webcam(); streaming_c=0; }); $('#webcam_close').click(function(e) { e.stopPropagation(); stopMedia_c(); //webrtc_stop(tempcounter); webrtc_stop_by_username(current_username); close_webcam(); streaming_c=0; }); $('#webcam_minimize').click(function(e) { e.stopPropagation(); $('#chatbutton_webcam').trigger('mouseup'); }); $('#webcam_size').click(function(e) { e.stopPropagation(); var tempwidth = $('#client_webcam_div').outerWidth(); if (tempwidth==180) $('#client_webcam_div').animate( { width: '360px', height: '202.5px' }, { duration: 300, queue: false }); if (tempwidth==360) $('#client_webcam_div').animate( { width: '480px', height: '270px' }, { duration: 300, queue: false }); if (tempwidth==480) $('#client_webcam_div').animate( { width: '640px', height: '360px' }, { duration: 300, queue: false }); if (tempwidth==640) $('#client_webcam_div').animate( { width: '180px', height: '101.25px' }, { duration: 300, queue: false }); }); function close_webcam() { $('#publish_btn_c').css({'display' : 'inline'}); $('#terminate_c').css({'display' : 'none'}); hidewebcam(); } function preview_max() { if ((chat_maximized==1) || (chat_maximized==2)) { $('#no_preview_'+current_preview_username).show(); $('#live_sign_'+current_preview_username).hide(); } else { $('#no_preview_'+current_performer_username).show(); $('#live_sign_'+current_preview_username).hide(); } } function preview_ended() { if ((chat_maximized==1) || (chat_maximized==2)) { $('#no_preview_'+current_preview_username).show(); $('#live_sign_'+current_preview_username).hide(); } else { $('#no_preview_'+current_performer_username).show(); $('#live_sign_'+current_preview_username).hide(); } } function heartbeatClients() { //console.log('heartbeat'); if ((current_username=='') || (current_ssid=='')) return; $.get('/php/_heartbeat_browser_clients.php?username='+current_username+'&ssid='+current_ssid, function( data ) { try { var heartbeat_response = JSON.parse(data); //console.log(heartbeat_response); if (heartbeat_response) { var temperrors = current_active = heartbeat_response.errors; if (temperrors=='') { current_active = heartbeat_response.active; current_active2 = heartbeat_response.active2; current_credit = heartbeat_response.credit; if (heartbeat_response.new_messages!='') { current_new_messages = heartbeat_response.new_messages; update_new_messages(); } if (heartbeat_response.pendingtrans!='') { if (parseInt(heartbeat_response.pendingtrans)>0) { gtag('event', 'conversion', { 'send_to': 'AW-832378431/3oUrCO-n3XUQv6z0jAM', 'value': 10.0, 'currency': 'EUR' }); gtag('event', 'conversion', { 'send_to': 'AW-832401280/Wuj6CK2M3XUQgN_1jAM', 'value': 10.0, 'currency': 'EUR' }); gtag('event', 'conversion', { 'send_to': 'AW-830263032/drA8CNySjncQ-J3ziwM', 'value': 10.0, 'currency': 'EUR' }); } } //console.log(heartbeat_response.script_time); } else { console.log('Error at heartbeat: '+temperrors); } } else console.log('Invalid heartbeat response format: '+err); } catch (err) { console.log('Invalid heartbeat response: '+err); } }); } setInterval(function(){ showStats(); }, 1000); setInterval(function(){ if ((logged_in==1) && (streaming_c==1)) { take_snapshot(); if (current_username!='') save_snapshot(); } }, 30*1000); setInterval(function(){ heartbeatClients(); }, 10*1000); load_tooltips();
18 U.S.C. 2257 Record-Keeping Requirements   Terms and Conditions   Test Your Device   Support   Become a Model
This site is owned and operated by CitaVian SRL.  Copyright © 2004 - 2020
The site contains sexually explicit material. Enter if you are at least 18 years old and agree to our cookie policy.