Incrustar video desde Streamtape usando enlace directo
21 oct 2020, 23:50:23
Vistas: 88.7K
Votos: 0
Buenas tardes, quiero incrustar este video en mi WordPress https://streamtape.com/v/7qDqGjlQe4UA9MR/Soul_Land_03_VOSTFR.mp4
Código de inserción <iframe src="https://streamtape.com/e/7qDqGjlQe4UA9MR/Soul_Land_03_VOSTFR.mp4" width="800" height="600" allowfullscreen allowtransparency allow="autoplay" scrolling="no" frameborder="0"></iframe>
He intentado pegar el siguiente código en mi archivo functions.php del tema pero no funciona. Estaría muy agradecido de recibir su ayuda
add_action( 'init', function()
{ wp_embed_register_handler(
'streamtape',
'#https://streamtape\.com\/v\/([a-zA-Z0-9_-]+)$#i',
'streamtape_embed_handler'
);
} );
function streamtape_embed_handler( $matches, $attr, $url, $rawattr )
{
$embed = sprintf(
'<IFRAME SRC="https://streamtape.com/e/([a-zA-Z0-9_-]+)$#i" FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=800 HEIGHT=600 allowfullscreen></IFRAME>',
esc_attr( $matches[1] )
);
return apply_filters( 'streamtape_embed_handler', $embed, $matches, $attr, $url, $rawattr );
}
Comentarios
Preguntas relacionadas
4
respuestas
5
respuestas