|
361 | 361 | ), |
362 | 362 | 'youtube-id' => array( |
363 | 363 | 'default' => '', |
364 | | - 'description' => __( '11-character YouTube ID or a URL to a YouTube video page.', 'ableplayer' ), |
| 364 | + 'description' => __( 'YouTube ID or a URL to a YouTube video page.', 'ableplayer' ), |
365 | 365 | ), |
366 | 366 | 'youtube-desc-id' => array( |
367 | 367 | 'default' => '', |
368 | | - 'description' => __( '11-character YouTube ID of an alternative described version of a video.', 'ableplayer' ), |
| 368 | + 'description' => __( 'YouTube ID or URL of an alternative described version of a video.', 'ableplayer' ), |
369 | 369 | ), |
370 | 370 | 'youtube-nocookie' => array( |
371 | 371 | 'default' => '', |
|
426 | 426 | 'vimeo-id' => '', |
427 | 427 | 'vimeo-desc-id' => '', |
428 | 428 | 'media-id' => '', |
| 429 | + 'media-desc-id' => '', |
| 430 | + 'media-asl-id' => '', |
429 | 431 | 'captions' => '', |
430 | 432 | 'subtitles' => '', |
431 | 433 | 'descriptions' => '', |
|
465 | 467 | $source = '<source type="' . esc_attr( $type ) . '" src="' . esc_url( $media_id ) . '">'; |
466 | 468 | } |
467 | 469 | } |
| 470 | + if ( $all_atts['media-desc-id'] ) { |
| 471 | + // If Video ID is set but is not a valid URL, return. |
| 472 | + $media_desc_id = ( is_numeric( $all_atts['media-desc-id'] ) ) ? wp_get_attachment_url( $all_atts['media-desc-id'] ) : $all_atts['media-desc-id']; |
| 473 | + if ( $media_desc_id ) { |
| 474 | + $type = get_post_mime_type( $media_desc_id ); |
| 475 | + $source = '<source data-desc-src type="' . esc_attr( $type ) . '" src="' . esc_url( $media_desc_id ) . '">'; |
| 476 | + } |
| 477 | + } |
| 478 | + if ( $all_atts['media-asl-id'] ) { |
| 479 | + // If Video ID is set but is not a valid URL, return. |
| 480 | + $media_desc_id = ( is_numeric( $all_atts['media-asl-id'] ) ) ? wp_get_attachment_url( $all_atts['media-asl-id'] ) : $all_atts['media-desc-id']; |
| 481 | + if ( $media_desc_id ) { |
| 482 | + $type = get_post_mime_type( $media_desc_id ); |
| 483 | + $source = '<source data-sign-src type="' . esc_attr( $type ) . '" src="' . esc_url( $media_desc_id ) . '">'; |
| 484 | + } |
| 485 | + } |
468 | 486 |
|
469 | 487 | $tracks = array(); |
470 | 488 | $kinds = array( |
|
0 commit comments