Skip to content

Commit ba62c91

Browse files
Merge pull request #281 from 10up/develop
Release 2.7.0
2 parents ea6c3a5 + 96bb514 commit ba62c91

19 files changed

+611
-513
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file, per [the Ke
44

55
## [Unreleased] - TBD
66

7+
## [2.7.0] - 2022-06-29
8+
9+
### Fixed
10+
- Picture in Picture not working. Props [@oscarssanchez](https://github.com/oscarssanchez), and [@felipeelia](https://github.com/felipeelia), via [#272](https://github.com/10up/brightcove-video-connect/pull/272).
11+
12+
### Added
13+
14+
- Enable audio track language detection based on browser language if video has multiple audio tracks. Props [@oscarssanchez](https://github.com/oscarssanchez), and [@felipeelia](https://github.com/felipeelia), via [#279](https://github.com/10up/brightcove-video-connect/pull/279).
15+
716
## [2.6.1] - 2022-06-07
817

918
### Fixed
@@ -372,6 +381,7 @@ All notable changes to this project will be documented in this file, per [the Ke
372381
- First release
373382

374383
[Unreleased]: https://github.com/10up/brightcove-video-connect/compare/master...develop
384+
[2.7.0]: https://github.com/10up/brightcove-video-connect/compare/2.6.1...2.7.0
375385
[2.6.1]: https://github.com/10up/brightcove-video-connect/compare/2.6.0...2.6.1
376386
[2.6.0]: https://github.com/10up/brightcove-video-connect/compare/2.5.2...2.6.0
377387
[2.5.2]: https://github.com/10up/brightcove-video-connect/compare/2.5.1...2.5.2

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ http://httpd.apache.org/docs/current/mod/core.html#limitrequestbody (LimitReques
104104
14. Selecting a playlist to show the details on the sidebar.
105105
![](/.wordpress-org/screenshot-14.png)
106106

107+
## Audio Track Language Detection
108+
109+
The plugin has the ability to auto determine audio track language detection if the option has been enabled, based on the user browser language.
110+
111+
However, in order for it to work you need to make sure you have multiple audio tracks available in Brightcove Studio for the video you want to enable this option, otherwise, this feature won't work.
112+
107113
## Support Level
108114

109115
**Active:** 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.

assets/css/brightcove_video_connect.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,8 @@ div.brightcove-uploader div.brightcove-messages .updated {
504504
clear: both; }
505505
.brightcove.media-frame-menu .attachment-detail .video-details input[type=number], .brightcove.media-frame-menu .attachment-detail .playlist-details input[type=number], .brightcove.media-frame-menu .attachment-detail .inpageexperiences-details input[type=number] {
506506
width: 20%; }
507+
.brightcove.media-frame-menu .attachment-detail .video-details input[type=checkbox], .brightcove.media-frame-menu .attachment-detail .playlist-details input[type=checkbox], .brightcove.media-frame-menu .attachment-detail .inpageexperiences-details input[type=checkbox] {
508+
margin-left: 10px; }
507509
.brightcove.media-frame-menu .attachment-detail .video-details textarea, .brightcove.media-frame-menu .attachment-detail .playlist-details textarea, .brightcove.media-frame-menu .attachment-detail .inpageexperiences-details textarea {
508510
margin-top: 10px;
509511
width: 100%; }

assets/css/brightcove_video_connect.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/brightcove-admin.js

Lines changed: 12 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/brightcove-admin.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/brightcove-admin.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/src/block.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
var autoplay = props.attributes.autoplay || '';
4343
var playsinline = props.attributes.playsinline || '';
4444
var pictureinpicture = props.attributes.picture_in_picture || '';
45+
var languageDetection = props.attributes.language_detection || '';
4546
var embed = props.attributes.embed || '';
4647
var mute = props.attributes.mute || '';
4748
var sizing = props.attributes.sizing || 'responsive';
@@ -201,6 +202,7 @@
201202
mute: '',
202203
playsinline: '',
203204
picture_in_picture: '',
205+
languageDetection: '',
204206
embed: attrs.named.embed,
205207
sizing: attrs.named.sizing,
206208
aspect_ratio: attrs.named.aspect_ratio,
@@ -213,6 +215,7 @@
213215
setAttrs.mute = attrs.named.mute;
214216
setAttrs.playsinline = attrs.named.playsinline;
215217
setAttrs.picture_in_picture = attrs.named.picture_in_picture;
218+
setAttrs.language_detection = attrs.named.language_detection;
216219
setAttrs.padding_top = attrs.named.padding_top;
217220
} else if (attrs.numeric[0] === '[bc_playlist') {
218221
setAttrs.player_id = attrs.named.player_id;
@@ -482,7 +485,18 @@
482485
});
483486
},
484487
}),
485-
pictureinpicture === 'pictureinpicture'
488+
el(components.CheckboxControl, {
489+
label: __('Enable Language Detection', 'brightcove'),
490+
checked: languageDetection,
491+
onChange: function (value) {
492+
props.setAttributes({
493+
...props.attributes,
494+
language_detection: value && 'languagedetection',
495+
});
496+
},
497+
}),
498+
languageDetection === 'languagedetection' ||
499+
pictureinpicture === 'pictureinpicture'
486500
? el(
487501
components.Disabled,
488502
{ style: { marginBottom: '24px' } },

assets/js/src/views/media-details.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ var MediaDetailsView = BrightcoveView.extend({
1818
'click .brightcove.back.button': 'triggerCancelPreviewMedia',
1919
'click .playlist-details input[name="embed-style"]': 'togglePlaylistSizing',
2020
'change #aspect-ratio': 'toggleUnits',
21-
'change #pictureinpicture': 'togglePictureinpicture',
21+
'change #pictureinpicture': 'toggleIframe',
22+
'change #languagedetection': 'toggleIframe',
2223
'change .experience-details input[name="sizing"],.experience-details input[name="embed-style"]':
2324
'toggleExperienceUnits',
24-
'change #video-player, #autoplay, #pictureinpicture, #playsinline, #mute, input[name="embed-style"], input[name="sizing"], #aspect-ratio, #width, #height':
25+
'change #video-player, #autoplay, #pictureinpicture, #languagedetection, #playsinline, #mute, input[name="embed-style"], input[name="sizing"], #aspect-ratio, #width, #height':
2526
'generateShortcode',
2627
'change #generate-shortcode': 'toggleShortcodeGeneration',
2728
},
@@ -73,11 +74,14 @@ var MediaDetailsView = BrightcoveView.extend({
7374
}
7475
},
7576

76-
togglePictureinpicture: function (event) {
77+
toggleIframe: function (event) {
7778
var $iframeRadioButton = $('#embed-style-iframe'),
78-
$pictureinpicture_checked = $('#pictureinpicture').is(':checked');
79+
notAllowedOptions = [
80+
$('#pictureinpicture').is(':checked'),
81+
$('#languagedetection').is(':checked'),
82+
];
7983

80-
if ($pictureinpicture_checked) {
84+
if (notAllowedOptions.includes(true)) {
8185
$iframeRadioButton.prop('checked', false);
8286
$iframeRadioButton.attr('disabled', true);
8387
} else {
@@ -137,6 +141,7 @@ var MediaDetailsView = BrightcoveView.extend({
137141
autoplay = $('#autoplay').is(':checked') ? 'autoplay' : '',
138142
playsinline = $('#playsinline').is(':checked') ? 'playsinline' : '',
139143
pictureinpicture = $('#pictureinpicture').is(':checked') ? 'pictureinpicture' : '',
144+
languagedetection = $('#languagedetection').is(':checked') ? 'languagedetection' : '',
140145
mute = $('#mute').is(':checked') ? 'muted' : '',
141146
embedStyle = $('input[name="embed-style"]:checked').val(),
142147
sizing = $('input[name="sizing"]:checked').val(),
@@ -190,6 +195,8 @@ var MediaDetailsView = BrightcoveView.extend({
190195
playsinline +
191196
'" picture_in_picture="' +
192197
pictureinpicture +
198+
'" language_detection="' +
199+
languagedetection +
193200
'" max_width="' +
194201
maxWidth +
195202
'" ' +

assets/scss/components/_video-grid.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,10 @@
336336
width: 20%;
337337
}
338338

339+
input[type=checkbox] {
340+
margin-left: 10px;
341+
}
342+
339343
textarea {
340344
margin-top: 10px;
341345
width: 100%;

0 commit comments

Comments
 (0)