@@ -332,18 +332,77 @@ function custom_style_for_activity_image_size() {
332332 $ media_width = 'auto ' ;
333333 }
334334
335- ?>
336- .rtmedia-activity-container .media-type-photo .rtmedia-item-thumbnail {
337- max-width: <?php echo esc_attr ( $ media_width ); ?> ;
338- max-height: <?php echo esc_attr ( $ media_height ); ?> ;
339- overflow: hidden ;
335+ $ video_height = ( isset ( $ this -> options [ ' defaultSizes_video_activityPlayer_height ' ] ) ? $ this -> options [ ' defaultSizes_video_activityPlayer_height ' ] : ' 240 ' );
336+ $ video_width = ( isset ( $ this -> options [ ' defaultSizes_video_activityPlayer_width ' ] ) ? $ this -> options [ ' defaultSizes_video_activityPlayer_width ' ] : ' 320 ' );
337+
338+ if ( ' 0 ' === $ video_height ) {
339+ $ video_height = ' 240 ' ;
340340 }
341341
342- .rtmedia-comment-media-container .mejs-container.mejs-video,
343- .rtmedia-activity-container .mejs-container.mejs-video{
344- min-height: <?php echo esc_attr ( $ this ->options ['defaultSizes_video_activityPlayer_height ' ] ); ?> px;
345- min-width: <?php echo esc_attr ( $ this ->options ['defaultSizes_video_activityPlayer_width ' ] ); ?> px;
342+ if ( '0 ' === $ video_width ) {
343+ $ video_width = '320 ' ;
346344 }
345+
346+ $ music_width = ( isset ( $ this ->options ['defaultSizes_music_activityPlayer_width ' ] ) ? $ this ->options ['defaultSizes_music_activityPlayer_width ' ] : '320 ' );
347+
348+ if ( '0 ' === $ music_width ) {
349+ $ music_width = '320 ' ;
350+ }
351+
352+ ?>
353+ .rtmedia-activity-container ul.rtm-activity-media-list{
354+ overflow: auto;
355+ }
356+
357+ div.rtmedia-activity-container ul.rtm-activity-media-list li.media-type-document,
358+ div.rtmedia-activity-container ul.rtm-activity-media-list li.media-type-other{
359+ margin-left: 0.6em !important;
360+ }
361+
362+ .rtmedia-activity-container li.media-type-video{
363+ height: <?php echo esc_attr ( $ video_height ); ?> px !important;
364+ width: <?php echo esc_attr ( $ video_width ); ?> px !important;
365+ }
366+
367+ .rtmedia-activity-container li.media-type-video div.rtmedia-item-thumbnail,
368+ .rtmedia-activity-container li.media-type-photo a{
369+ width: 100% !important;
370+ height: 98% !important;
371+ }
372+
373+ .rtmedia-activity-container li.media-type-video div.rtmedia-item-thumbnail video{
374+ width: 100% !important;
375+ height: 100% !important;
376+ }
377+
378+ .rtmedia-activity-container li.media-type-video div.rtmedia-item-thumbnail .mejs-video,
379+ .rtmedia-activity-container li.media-type-video div.rtmedia-item-thumbnail .mejs-video video,
380+ .rtmedia-activity-container li.media-type-video div.rtmedia-item-thumbnail .mejs-video .mejs-overlay-play{
381+ width: 100% !important;
382+ height: 100% !important;
383+ }
384+
385+ .rtmedia-activity-container li.media-type-music{
386+ width: <?php echo esc_attr ( $ music_width ); ?> px !important;
387+ }
388+
389+ .rtmedia-activity-container li.media-type-music .rtmedia-item-thumbnail,
390+ .rtmedia-activity-container li.media-type-music .rtmedia-item-thumbnail .mejs-audio,
391+ .rtmedia-activity-container li.media-type-music .rtmedia-item-thumbnail audio{
392+ width: 100% !important;
393+ }
394+
395+ .rtmedia-activity-container li.media-type-photo{
396+ width: <?php echo esc_attr ( $ media_width ); ?> !important;
397+ height: <?php echo esc_attr ( $ media_height ); ?> !important;
398+ }
399+
400+ .rtmedia-activity-container .media-type-photo .rtmedia-item-thumbnail,
401+ .rtmedia-activity-container .media-type-photo .rtmedia-item-thumbnail img {
402+ width: 100% !important;
403+ height: 100% !important;
404+ overflow: hidden;
405+ }
347406 <?php
348407 global $ rtmedia ;
349408 if ( rtmedia_check_comment_media_allow () && ! rtmedia_check_comment_in_commented_media_allow () ) { ?>
0 commit comments