PluginProbe
WpStream – Live Streaming, Video on Demand, Pay Per View / 4.8.2
WpStream – Live Streaming, Video on Demand, Pay Per View v4.8.2
4.14.1 4.14.0 4.13.2 4.13.1 4.13 4.12.5 4.12.4 4.12.3 4.12.2 4.12.1 4.12 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9 4.5 4.5.1 4.5.11 4.5.11.1 4.5.11.2 4.5.11.4 4.5.11.5 4.5.11.6 All 181 releases
← All changes | admin/js/admin_control.js +8 -64 4.12.4 → 4.8.2 View file →
@@ -11,10 +11,9 @@
11 11
12 12
13 13 WpStreamUtils.generate_download_link();
14 14 WpStreamUtils.generate_delete_link();
15 - wpstream_handle_video_selection();
16 - wpstream_handle_caption_selection();
15 + wpstream_handle_video_selection();
17 16 wpstream_upload_images_in_wpadmin();
18 17
19 18 wpstream_upload_player_logo();
20 19
@@ -116,24 +115,16 @@
116 115 // Get file info
117 116 var file = data.files[0];
118 117 var fileSizeInBytes = file.size;
119 118 var file_size = (parseInt(fileSizeInBytes, 10))/1000000;
120 - if ( wpstream_admin_control_vars.use_streaming_hours ) {
121 - var user_storage_hours = jQuery('#wpstream_storage_hours').val();
122 - if ( parseFloat(user_storage_hours) <= 0 ) {
123 - jQuery('#wpstream_uploaded_mes').empty().html(wpstream_admin_control_vars.no_streaming_hours);
124 - return;
125 - }
126 - } else {
127 - var user_storage = jQuery('#wpstream_storage').val();
128 - var user_band = jQuery('#wpstream_band').val();
119 + var user_storage = jQuery('#wpstream_storage').val();
120 + var user_band = jQuery('#wpstream_band').val();
129 121
130 - if(file_size > user_storage || file_size > user_band){
131 - jQuery('#wpstream_uploaded_mes').empty().html(wpstream_admin_control_vars.no_band_no_store);
132 - return;
133 - }
134 - }
135 -
122 + if(file_size > user_storage || file_size > user_band){
123 + jQuery('#wpstream_uploaded_mes').empty().html(wpstream_admin_control_vars.no_band_no_store);
124 + return;
125 + }
126 +
136 127 // Update UI
137 128 $('#wpstream_label_action').text(wpstream_admin_control_vars.uploading);
138 129 $('#wpstream_upload').prop('disabled', true);
139 130 $('label[for="wpstream_upload"]')
@@ -206,9 +197,8 @@
206 197 url: ajaxurl,
207 198 dataType: 'json',
208 199 data: {
209 200 'action': 'wpstream_initiate_multipart_upload',
210 - 'security': wpstream_admin_control_vars.multipart_upload_nonce,
211 201 'file_name': fileName,
212 202 'file_size': fileSize,
213 203 'content_type': file.type,
214 204 'parts': numParts
@@ -341,9 +331,8 @@
341 331 url: ajaxurl,
342 332 dataType: 'json',
343 333 data: {
344 334 'action': 'wpstream_complete_multipart_upload',
345 - 'security': wpstream_admin_control_vars.multipart_upload_nonce,
346 335 'parts': totalParts,
347 336 'file_name': file.name,
348 337 'handle': handle,
349 338 },
@@ -598,54 +587,9 @@
598 587 });
599 588 });
600 589 }
601 590
602 -/*
603 -* handle caption selection for recording
604 - */
605 -function wpstream_handle_caption_selection(){
606 - jQuery('#wpstream_vod_captions_url_button').on( 'click', function(event) {
607 - event.preventDefault();
608 - var parent = jQuery(this).parent();
609 - var button = jQuery(this);
610 591
611 - var mediaUploader = wp.media({
612 - title: wpstream_admin_control_vars.select_caption_file,
613 - button: {
614 - text: 'Select'
615 - },
616 - multiple: false,
617 - library: {
618 - type: 'text/vtt'
619 - }
620 - });
621 -
622 - mediaUploader.on("select", function(){
623 - var attachment = mediaUploader.state().get("selection").first().toJSON();
624 - parent.find('#wpstream_closed_captions_file').val(attachment.url);
625 - parent.find('.wpstream_caption_file_display').text(attachment.filename);
626 -
627 - button.hide();
628 -
629 - if( parent.find('.wpstream_remove_caption').length === 0 ){
630 - parent.append('<input type="button" class="button wpstream_remove_caption" value="' + wpstream_admin_control_vars.remove_button + '" style="margin-left: 5px;" />');
631 - }
632 - });
633 -
634 - mediaUploader.open();
635 - });
636 -
637 - jQuery(document).on('click', '.wpstream_remove_caption', function(e){
638 - e.preventDefault();
639 - var parent = jQuery(this).parent();
640 - parent.find('#wpstream_closed_captions_file').val('');
641 - parent.find('.wpstream_caption_file_display').text('');
642 -
643 - parent.find('#wpstream_vod_captions_url_button').show();
644 -
645 - jQuery(this).remove();
646 - });
647 -}
648 592
649 593 /*
650 594 * return uploaded image
651 595 *