_recordings' ); $downloadable = ! empty( $atts['downloadable'] ) && $atts['downloadable'] === "yes"; if ( empty( $atts['host_id'] ) ) { echo '

' . __( 'Invalid HOST ID. Please define a host ID to show recordings based on host.', 'video-conferencing-with-zoom-api' ) . '

'; return false; } wp_enqueue_script( 'jquery-ui-datepicker' ); wp_enqueue_style( 'video-conferencing-with-zoom-api-datable-responsive' ); wp_enqueue_script( 'video-conferencing-with-zoom-api-datable-responsive-js' ); wp_enqueue_script( 'video-conferencing-with-zoom-api-datable-dt-responsive-js' ); wp_enqueue_script( 'video-conferencing-with-zoom-api-shortcode-js' ); $postParams = array( 'page_size' => 300 //$atts['per_page'] disbled for now ); if ( isset( $_GET['fetch_recordings'] ) && isset( $_GET['date'] ) ) { $search_date = strtotime( $_GET['date'] ); $from = date( 'Y-m-d', $search_date ); $to = date( 'Y-m-t', $search_date ); $postParams['from'] = $from; $postParams['to'] = $to; //Pagination if ( isset( $_GET['pg'] ) && isset( $_GET['type'] ) && $_GET['type'] === "recordings" ) { $postParams['next_page_token'] = $_GET['pg']; } } $recordings = json_decode( zoom_conference()->listRecording( $atts['host_id'], $postParams ) ); unset( $GLOBALS['zoom_recordings'] ); ob_start(); if ( ! empty( $recordings ) ) { if ( ! empty( $recordings->code ) && ! empty( $recordings->message ) ) { echo $recordings->message; } else { $GLOBALS['zoom_recordings'] = $recordings; $GLOBALS['zoom_recordings']->downloadable = $downloadable; vczapi_get_template( 'shortcode/zoom-recordings.php', true, false, $atts ); } } else { _e( "No recordings found.", "video-conferencing-with-zoom-api" ); } return ob_get_clean(); } /** * Show recordings based on Meeting ID * * @param $atts * * @return bool|false|string */ public function recordings_by_meeting_id( $atts ) { $atts = shortcode_atts( array( 'meeting_id' => '', 'passcode' => 'no', 'downloadable' => 'no' ), $atts, 'zoom_recordings' ); if ( empty( $atts['meeting_id'] ) ) { echo '

' . __( 'Invalid Meeting ID.', 'video-conferencing-with-zoom-api' ) . '

'; return false; } $meeting_id = esc_attr( $atts['meeting_id'] ); wp_enqueue_script( 'video-conferencing-with-zoom-api-shortcode-js' ); ob_start(); $loading_text = esc_html__( "Loading recordings.. Please wait..", "video-conferencing-with-zoom-api" ); echo '
'; return ob_get_clean(); } /** * Get Meeting recording ajax call function * * @return void */ public function getRecordingsByMeetingID() { $recordings = []; $meeting_id = filter_input( INPUT_GET, 'meeting_id' ); $passcode = filter_input( INPUT_GET, 'passcode' ); $downloadable = filter_input( INPUT_GET, 'downloadable' ); if ( empty( $meeting_id ) ) { wp_send_json_error( __( 'Meeting ID is not specified', "video-conferencing-with-zoom-api" ) ); } $zoomObj = Zoom::instance(); $meeting_info = json_decode( zoom_conference()->getMeetingInfo( $meeting_id ) ); //if it's a regular meeting or webinar use the meeting id as it seems it's more reliable //https://devforum.zoom.us/t/recording-api-issue/102992 if ( MeetingType::is_scheduled_meeting_or_webinar( $meeting_info->type ) ) { $recordings[] = $zoomObj->recordingsByMeeting( $meeting_id ); } else { //if it's a recurring meeting / webinar we're going to need to get pass meeting details $all_past_meetings = $zoomObj->getPastMeetingDetails( $meeting_id ); if ( ! empty( $all_past_meetings->meetings ) && ! isset( $all_past_meetings->code ) ) { //loop through all instance of past / completed meetings and get recordings foreach ( $all_past_meetings->meetings as $meeting ) { $recordings[] = $zoomObj->recordingsByMeeting( $meeting->uuid ); } } else { $recordings[] = $zoomObj->recordingsByMeeting( $meeting_id ); } } if ( ! empty( $recordings ) ) { if ( ! empty( $recordings[0]->code ) && ! empty( $recordings[0]->message ) ) { wp_send_json_error( $recordings[0]->message ); } else { $template = ''; ob_start(); vczapi_get_template( 'shortcode/zoom-recordings-by-meeting.php', true, false, [ 'recordings' => $recordings, 'passcode' => $passcode, 'downloadable' => $downloadable ] ); $template .= ob_get_clean(); wp_send_json_success( $template ); } } else { wp_send_json_success( __( "No recordings found.", "video-conferencing-with-zoom-api" ) ); } wp_die(); } }
Fatal error: Uncaught Error: Class 'Codemanas\VczApi\Shortcodes\Recordings' not found in /var/www/html/alertamt.com.br/web/wp-content/plugins/video-conferencing-with-zoom-api/includes/Shortcodes.php:43 Stack trace: #0 /var/www/html/alertamt.com.br/web/wp-content/plugins/video-conferencing-with-zoom-api/includes/Shortcodes.php(25): Codemanas\VczApi\Shortcodes->__construct() #1 /var/www/html/alertamt.com.br/web/wp-content/plugins/video-conferencing-with-zoom-api/includes/Bootstrap.php(237): Codemanas\VczApi\Shortcodes::get_instance() #2 /var/www/html/alertamt.com.br/web/wp-content/plugins/video-conferencing-with-zoom-api/includes/Bootstrap.php(47): Codemanas\VczApi\Bootstrap->load_dependencies() #3 /var/www/html/alertamt.com.br/web/wp-content/plugins/video-conferencing-with-zoom-api/includes/Bootstrap.php(31): Codemanas\VczApi\Bootstrap->__construct() #4 /var/www/html/alertamt.com.br/web/wp-includes/class-wp-hook.php(324): Codemanas\VczApi\Bootstrap::instance('') #5 /var/www/html/alertamt.com.br/web/wp-includes/class-wp-hoo in /var/www/html/alertamt.com.br/web/wp-content/plugins/video-conferencing-with-zoom-api/includes/Shortcodes.php on line 43