Created
February 18, 2016 17:39
-
-
Save lukecav/f32f8ad09b32e32f2631 to your computer and use it in GitHub Desktop.
Video Loading Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//video files uploaded into media library and saved to the post via Advanced Custom Fields | |
$webm = get_sub_field('webm'); | |
$mp4 = get_sub_field('mp4'); | |
$ogv = get_sub_field('ogv'); | |
?> | |
<video class="video"> | |
<source src="<?php echo $webm['url']; ?>" type="video/webm"> | |
<source src="<?php echo $mp4['url']; ?>" type="video/mp4"> | |
<source src="<?php echo $ogv['url']; ?>" type="video/ogv"> | |
Your browser does not support the video tag. | |
</video> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment