Skip to content

Commit

Permalink
Merge pull request #278 from 10up/develop
Browse files Browse the repository at this point in the history
Release 2.6.1
  • Loading branch information
oscarssanchez authored Jun 7, 2022
2 parents 438274b + d41cc1f commit ea6c3a5
Show file tree
Hide file tree
Showing 10 changed files with 188 additions and 154 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file, per [the Ke

## [Unreleased] - TBD

## [2.6.1] - 2022-06-07

### Fixed
- Brightcove API changes break video edit view. Props [@oscarssanchez](https://github.com/oscarssanchez), and [@felipeelia](https://github.com/felipeelia), via [#276](https://github.com/10up/brightcove-video-connect/pull/276).

## [2.6.0] - 2022-04-19

### Added
Expand Down Expand Up @@ -367,6 +372,7 @@ All notable changes to this project will be documented in this file, per [the Ke
- First release

[Unreleased]: https://github.com/10up/brightcove-video-connect/compare/master...develop
[2.6.1]: https://github.com/10up/brightcove-video-connect/compare/2.6.0...2.6.1
[2.6.0]: https://github.com/10up/brightcove-video-connect/compare/2.5.2...2.6.0
[2.5.2]: https://github.com/10up/brightcove-video-connect/compare/2.5.1...2.5.2
[2.5.1]: https://github.com/10up/brightcove-video-connect/compare/2.5.0...2.5.1
Expand Down
4 changes: 4 additions & 0 deletions assets/js/brightcove-admin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/brightcove-admin.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/brightcove-admin.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions assets/js/src/views/video-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,10 @@ var VideoEditView = BrightcoveView.extend({
this.listenTo(wpbc.broadcast, 'insert:shortcode', this.insertShortcode);
options = this.model.toJSON();
options.folders = wpbc.preload.folders;

// Due to a change in the API response, text_tracks might not be defined if the video lacks text_tracks.
options.text_tracks = options.text_tracks || [];

this.model.set('oldFolderId', options.folder_id);

// Render the model into the template
Expand Down
4 changes: 2 additions & 2 deletions brightcove-video-connect.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Brightcove Video Connect
* Plugin URI: https://wordpress.org/plugins/brightcove-video-connect/
* Description: A Brightcove™ Connector for WordPress that leverages enhanced APIs and Brightcove™ Capabilities
* Version: 2.6.0
* Version: 2.6.1
* Author: 10up
* Author URI: http://10up.com
* License: GPLv2+
Expand All @@ -29,7 +29,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 021.0.2301 USA
*/

define( 'BRIGHTCOVE_VERSION', '2.6.0' );
define( 'BRIGHTCOVE_VERSION', '2.6.1' );
define( 'BRIGHTCOVE_URL', plugin_dir_url( __FILE__ ) );
define( 'BRIGHTCOVE_PATH', dirname( __FILE__ ) . '/' );
define( 'BRIGHTCOVE_BASENAME', plugin_basename( __FILE__ ) );
Expand Down
14 changes: 8 additions & 6 deletions includes/admin/api/class-bc-admin-media-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -1074,12 +1074,14 @@ protected function fetch_videos( $account_id, $count = 10 ) {
// Massage the text tracks
$result['captions'] = array();

foreach ( $result['text_tracks'] as $caption ) {
$result['captions'][] = array(
'source' => $caption['src'],
'language' => $caption['srclang'],
'label' => $caption['label'],
);
if ( ! empty( $result['text_tracks'] ) ) {
foreach ( $result['text_tracks'] as $caption ) {
$result['captions'][] = array(
'source' => $caption['src'],
'language' => $caption['srclang'],
'label' => $caption['label'],
);
}
}
}

Expand Down
Loading

0 comments on commit ea6c3a5

Please sign in to comment.