File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ public function filter_video_shortcode( $html, $attr ) {
256256 */
257257 public function filter_video_tags ( $ content ) {
258258
259- $ video_tags = $ this ->media ->filter ->get_media_tags ( $ content , 'video ' );
259+ $ video_tags = $ this ->media ->filter ->get_media_tags ( $ content , 'video|source ' );
260260 foreach ( $ video_tags as $ tag ) {
261261 $ args = array ();
262262
@@ -282,7 +282,10 @@ public function filter_video_tags( $content ) {
282282 }
283283 $ attachment_id = $ this ->media ->filter ->get_id_from_tag ( $ tag );
284284 if ( empty ( $ attachment_id ) ) {
285- continue ; // Missing or no attachment ID found.
285+ $ attachment_id = attachment_url_to_postid ( $ url );
286+ if ( ! $ attachment_id ) {
287+ continue ; // Missing or no attachment ID found.
288+ }
286289 }
287290 // Enable Autoplay for this video.
288291 if ( false !== strpos ( $ tag , 'autoplay ' ) ) {
You can’t perform that action at this time.
0 commit comments