From 17f4e308633959f749ea8a275bb649244d1d54a4 Mon Sep 17 00:00:00 2001 From: Mukul Singh Date: Mon, 16 May 2022 18:16:34 +0530 Subject: [PATCH 1/2] Add default video thumbnail for activity page --- app/main/controllers/activity/RTMediaActivity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main/controllers/activity/RTMediaActivity.php b/app/main/controllers/activity/RTMediaActivity.php index a71d5a1eb..56fb94fd4 100755 --- a/app/main/controllers/activity/RTMediaActivity.php +++ b/app/main/controllers/activity/RTMediaActivity.php @@ -261,7 +261,7 @@ public function media( $media, $type = 'activity' ) { if ( $cover_art ) { $poster = 'poster = "' . esc_url( $cover_art ) . '"'; } else { - $poster = ''; + $poster = 'poster = "' . esc_url( $rtmedia->allowed_types['video']['thumbnail'] ) . '"'; } if ( empty( $youtube_url ) ) { $html = ''; From 1eb5f8887c3614127f29206f83fcb5e0c4454015 Mon Sep 17 00:00:00 2001 From: Mukul Singh Date: Wed, 18 May 2022 15:37:34 +0530 Subject: [PATCH 2/2] Add video default thumbnail on activity page --- app/main/controllers/activity/RTMediaActivity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/main/controllers/activity/RTMediaActivity.php b/app/main/controllers/activity/RTMediaActivity.php index 56fb94fd4..a590f1ba0 100755 --- a/app/main/controllers/activity/RTMediaActivity.php +++ b/app/main/controllers/activity/RTMediaActivity.php @@ -261,10 +261,10 @@ public function media( $media, $type = 'activity' ) { if ( $cover_art ) { $poster = 'poster = "' . esc_url( $cover_art ) . '"'; } else { - $poster = 'poster = "' . esc_url( $rtmedia->allowed_types['video']['thumbnail'] ) . '"'; + $poster = ''; } if ( empty( $youtube_url ) ) { - $html = ''; + $html = ''; $html = sprintf( $html, $poster, esc_url( wp_get_attachment_url( $media->media_id ) ), esc_attr( $rtmedia->options['defaultSizes_video_activityPlayer_width'] ), esc_attr( $rtmedia->options['defaultSizes_video_activityPlayer_height'] ), $video_class, esc_attr( $media->id ) ); } } elseif ( 'music' === $media->media_type ) {