Changeset 767688
- Timestamp:
- 09/06/2013 04:31:36 AM (13 years ago)
- Location:
- fluid-video-embeds/trunk
- Files:
-
- 2 edited
-
fluid-video-embeds.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fluid-video-embeds/trunk/fluid-video-embeds.php
r608160 r767688 5 5 Description: Makes your YouTube and Vimeo auto-embeds fluid/full width. 6 6 Author: jamie3d 7 Version: 1.1. 07 Version: 1.1.1 8 8 Author URI: http://jamie3d.com 9 9 */ … … 364 364 $video_meta['created_at'] = strtotime( $response_json->entry->published->{'$t'} ); 365 365 $video_meta['aspect'] = 'standard'; 366 if( isset( $response_json->entry->{' media$group'}->{'yt$aspectRatio'} ) ) {367 $video_meta['aspect'] = ( $response_json->entry->{'media$group'}->{'yt$aspectRatio'}->{'$t'} == 'widescreen') ? 'widescreen' : 'standard';366 if( isset( $response_json->entry->{'yt$hd'} ) ) { 367 $video_meta['aspect'] = ( isset( $response_json->entry->{'yt$hd'} ) ) ? 'widescreen' : 'standard'; 368 368 } 369 369 $video_meta['duration'] = $response_json->entry->{'media$group'}->{'yt$duration'}->{'seconds'}; … … 454 454 register_activation_hook( __FILE__, array('FluidVideoEmbed', 'activate') ); 455 455 register_deactivation_hook( __FILE__, array('FluidVideoEmbed', 'deactivate') ); 456 457 ?> -
fluid-video-embeds/trunk/readme.txt
r648872 r767688 4 4 Tags: video, youtube, vimeo, fluid, flexible, elastic, responsive, 100%, full width, embed, oEmbed 5 5 Requires at least: 3.3 6 Tested up to: 3. 56 Tested up to: 3.6 7 7 Stable tag: trunk 8 8 License: GPLv3 … … 32 32 for doing this is not very new (and is outlined in the credits links below), however I've added a bit of "sugar" to the mix. Since Vimeo and YouTube have robust, 33 33 open APIs, I'm requesting information about each video server side (which is then cached) and used to determine the optimal aspect ratio for the video container. 34 35 Note (September 2013): YouTube's API is not always returning the property I'm looking for. For newer videos, this may not work correctly in all cases. As a workaround, the default for YouTube has been changed to 'widescreen'. 34 36 35 37 = Credits = … … 64 66 65 67 == Changelog == 68 = 1.1.1 = 69 Changed the way that YouTube widescreen videos are determined. It looks like they changed an API without letting us know. 70 66 71 = 1.1.0 = 67 72 Adding a [fve] shortcode for use in your theme like this: `<?php echo do_shortcode('[fve]http://www.youtube.com/watch?v=oHg5SJYRHA0[/fve]'); ?>`
Note: See TracChangeset
for help on using the changeset viewer.