ARVE Advanced Responsive Video Embedder (YouTube, Vimeo, HTML5 Video …) - Version 9.0.1

Version Description

Download this release

Release Info

Developer nico23
Plugin Icon 128x128 ARVE Advanced Responsive Video Embedder (YouTube, Vimeo, HTML5 Video …)
Version 9.0.1
Comparing to
See all releases

Code changes from version 9.0.0-beta13 to 9.0.1

advanced-responsive-video-embedder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: ARVE Advanced Responsive Video Embedder
4
  * Plugin URI: https://nextgenthemes.com/plugins/arve-pro/
5
  * Description: Easy responsive video embeds via URL (like WordPress) or Shortcodes. Supports almost anything you can imagine.
6
- * Version: 9.0.0-beta13
7
  * Author: Nicolas Jonas
8
  * Author URI: https://nextgenthemes.com
9
  * License: GPL-3.0
@@ -21,7 +21,7 @@
21
 
22
  namespace Nextgenthemes\ARVE;
23
 
24
- const VERSION = '9.0.0-beta13';
25
  const PRO_VERSION_REQUIRED = '5.0.0-beta5';
26
  const NUM_TRACKS = 3;
27
  const PLUGIN_FILE = __FILE__;
3
  * Plugin Name: ARVE Advanced Responsive Video Embedder
4
  * Plugin URI: https://nextgenthemes.com/plugins/arve-pro/
5
  * Description: Easy responsive video embeds via URL (like WordPress) or Shortcodes. Supports almost anything you can imagine.
6
+ * Version: 9.0.1
7
  * Author: Nicolas Jonas
8
  * Author URI: https://nextgenthemes.com
9
  * License: GPL-3.0
21
 
22
  namespace Nextgenthemes\ARVE;
23
 
24
+ const VERSION = '9.0.1';
25
  const PRO_VERSION_REQUIRED = '5.0.0-beta5';
26
  const NUM_TRACKS = 3;
27
  const PLUGIN_FILE = __FILE__;
php/functions-html-output.php CHANGED
@@ -202,14 +202,12 @@ function arve_embed_inner_html( array $a ) {
202
 
203
  if ( $options['seo_data'] ) :
204
 
205
- $a['first_source'] = empty( $a['sources'] ) ? '' : Common\first_array_value( $a['sources'] );
206
-
207
  $metas = [
208
- 'first_source' => 'contentURL',
209
- 'src' => 'embedURL',
210
- 'upload_date' => 'uploadDate',
211
- 'author_name' => 'author',
212
- 'duration' => 'duration',
213
  ];
214
 
215
  foreach ( $metas as $key => $itemprop ) {
@@ -218,7 +216,7 @@ function arve_embed_inner_html( array $a ) {
218
  if ( 'duration' === $key && \is_numeric( $a[ $key ] ) ) {
219
  $a[ $key ] = seconds_to_iso8601_duration( $a[ $key ] );
220
  }
221
- $html .= sprintf( PHP_EOL . '<meta itemprop="%s" content="%s">' . PHP_EOL, esc_attr( $itemprop ), esc_attr( $a[ $key ] ) );
222
  }
223
  }
224
 
202
 
203
  if ( $options['seo_data'] ) :
204
 
 
 
205
  $metas = [
206
+ 'first_video_file' => 'contentURL',
207
+ 'src' => 'embedURL',
208
+ 'upload_date' => 'uploadDate',
209
+ 'author_name' => 'author',
210
+ 'duration' => 'duration',
211
  ];
212
 
213
  foreach ( $metas as $key => $itemprop ) {
216
  if ( 'duration' === $key && \is_numeric( $a[ $key ] ) ) {
217
  $a[ $key ] = seconds_to_iso8601_duration( $a[ $key ] );
218
  }
219
+ $html .= sprintf( '<meta itemprop="%s" content="%s">' . PHP_EOL, esc_attr( $itemprop ), esc_attr( $a[ $key ] ) );
220
  }
221
  }
222
 
php/functions-shortcode-filters.php CHANGED
@@ -490,6 +490,7 @@ function compare_oembed_src_with_generated_src( array $a ) {
490
  $src_gen = $a['src_gen'];
491
 
492
  switch ( $a['provider'] ) {
 
493
  case 'vimeo':
494
  $src = Common\remove_url_query( $a['src'] );
495
  $src_gen = Common\remove_url_query( $a['src_gen'] );
@@ -501,15 +502,15 @@ function compare_oembed_src_with_generated_src( array $a ) {
501
 
502
  if ( $src !== $src_gen ) {
503
  $msg = sprintf(
504
- 'src mismatch <br>url: %s<br>src in: %s<br>src gen: %s',
505
  $a['url'],
506
  $a['src'],
507
  $a['src_gen']
508
  );
509
 
510
- if ( 'vimeo' === $a['provider'] ) {
511
  $msg .= sprintf(
512
- 'vimeo compared <br>url: %s<br>src in: %s<br>src gen: %s',
513
  $a['url'],
514
  $src,
515
  $src_gen
@@ -562,7 +563,6 @@ function build_iframe_src( array $a ) {
562
  if ( $t_arg ) {
563
  $src = add_query_arg( 'start', youtube_time_to_seconds( $t_arg ), $src );
564
  }
565
-
566
  if ( $time_continue ) {
567
  $src = add_query_arg( 'start', youtube_time_to_seconds( $time_continue ), $src );
568
  }
@@ -767,7 +767,12 @@ function sc_filter_detect_html5( array $a ) {
767
 
768
  if ( $a[ $ext ] ) {
769
  $a['video_sources_html'] .= sprintf( '<source type="%s" src="%s">', get_video_type( $ext ), $a[ $ext ] );
 
 
 
 
770
  }
 
771
  endforeach;
772
 
773
  if ( $a['video_sources_html'] ) {
490
  $src_gen = $a['src_gen'];
491
 
492
  switch ( $a['provider'] ) {
493
+ case 'wistia':
494
  case 'vimeo':
495
  $src = Common\remove_url_query( $a['src'] );
496
  $src_gen = Common\remove_url_query( $a['src_gen'] );
502
 
503
  if ( $src !== $src_gen ) {
504
  $msg = sprintf(
505
+ 'src mismatch<br>url: %s<br>src in: %s<br>src gen: %s',
506
  $a['url'],
507
  $a['src'],
508
  $a['src_gen']
509
  );
510
 
511
+ if ( $src !== $a['src'] || $src_gen !== $a['src_gen'] ) {
512
  $msg .= sprintf(
513
+ 'Actual comparison<br>url: %s<br>src in: %s<br>src gen: %s',
514
  $a['url'],
515
  $src,
516
  $src_gen
563
  if ( $t_arg ) {
564
  $src = add_query_arg( 'start', youtube_time_to_seconds( $t_arg ), $src );
565
  }
 
566
  if ( $time_continue ) {
567
  $src = add_query_arg( 'start', youtube_time_to_seconds( $time_continue ), $src );
568
  }
767
 
768
  if ( $a[ $ext ] ) {
769
  $a['video_sources_html'] .= sprintf( '<source type="%s" src="%s">', get_video_type( $ext ), $a[ $ext ] );
770
+
771
+ if ( empty( $a['first_video_file'] ) ) {
772
+ $a['first_video_file'] = $a[ $ext ];
773
+ }
774
  }
775
+
776
  endforeach;
777
 
778
  if ( $a['video_sources_html'] ) {
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: YouTube, Vimeo, lazyload, thumbnail, video, responsive, embeds, video-embe
5
  Requires at least: 4.4.0
6
  Tested up to: 5.6
7
  Requires PHP: 5.6
8
- Stable tag: 9.0.0-beta13
9
  License: GPL-3.0
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -16,6 +16,10 @@ Easy responsive video embeds via URLs or shortcodes. Perfect drop-in replacement
16
  * [ARVE Pro addon changelog](https://nextgenthemes.com/plugins/arve-pro/changelog/)
17
  * [ARVE AMP addon changelog](https://nextgenthemes.com/plugins/arve-amp/)
18
 
 
 
 
 
19
  ### 2020-12-14 9.0.0-beta13 ###
20
 
21
  * Fix: When no oembed data is found or input `src` is invalid url use generated `src` in all cases.
5
  Requires at least: 4.4.0
6
  Tested up to: 5.6
7
  Requires PHP: 5.6
8
+ Stable tag: 9.0.1
9
  License: GPL-3.0
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
16
  * [ARVE Pro addon changelog](https://nextgenthemes.com/plugins/arve-pro/changelog/)
17
  * [ARVE AMP addon changelog](https://nextgenthemes.com/plugins/arve-amp/)
18
 
19
+ ### 2020-12-17 9.0.1 ###
20
+
21
+ * Fix: `contentURL` output for html5 video file embeds.
22
+
23
  ### 2020-12-14 9.0.0-beta13 ###
24
 
25
  * Fix: When no oembed data is found or input `src` is invalid url use generated `src` in all cases.