File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -401,6 +401,7 @@ function ableplayer_shortcode( $atts, $content = null ) {
401401 'vimeo-desc-id ' => '' ,
402402 'media-id ' => '' ,
403403 'media-desc-id ' => '' ,
404+ 'media-asl-id ' => '' ,
404405 'captions ' => '' ,
405406 'subtitles ' => '' ,
406407 'descriptions ' => '' ,
@@ -448,6 +449,14 @@ function ableplayer_shortcode( $atts, $content = null ) {
448449 $ source = '<source data-desc-src type=" ' . esc_attr ( $ type ) . '" src=" ' . esc_url ( $ media_desc_id ) . '"> ' ;
449450 }
450451 }
452+ if ( $ all_atts ['media-asl-id ' ] ) {
453+ // If Video ID is set but is not a valid URL, return.
454+ $ media_desc_id = ( is_numeric ( $ all_atts ['media-asl-id ' ] ) ) ? wp_get_attachment_url ( $ all_atts ['media-asl-id ' ] ) : $ all_atts ['media-desc-id ' ];
455+ if ( $ media_desc_id ) {
456+ $ type = get_post_mime_type ( $ media_desc_id );
457+ $ source = '<source data-sign-src type=" ' . esc_attr ( $ type ) . '" src=" ' . esc_url ( $ media_desc_id ) . '"> ' ;
458+ }
459+ }
451460
452461 $ tracks = array ();
453462 $ kinds = array (
You can’t perform that action at this time.
0 commit comments