Skip to content

Commit cdbd848

Browse files
authored
Merge pull request #931 from cloudinary/update/video-player
Update video player
2 parents f8ea5cf + 20ba5d3 commit cdbd848

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

php/class-media.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,6 @@ public function get_id_from_url( $url ) {
745745
}
746746

747747
return $attachment_id;
748-
749748
}
750749

751750
/**
@@ -1268,6 +1267,13 @@ public function apply_default_transformations( array $transformations, $attachme
12681267
$new_transformations['global'] = implode( '/', $freeform[ $type ] );
12691268
}
12701269
}
1270+
1271+
$streaming = $this->get_settings()->get_value( 'adaptive_streaming', 'adaptive_streaming_mode' );
1272+
1273+
if ( 'video' === $type && 'on' === $streaming['adaptive_streaming'] ) {
1274+
unset( $new_transformations['qf'] );
1275+
}
1276+
12711277
// Clean out empty parts, and join into a sectioned string.
12721278
$new_transformations = array_filter( $new_transformations );
12731279
$new_transformations = implode( '/', $new_transformations );
@@ -3230,6 +3236,5 @@ public function upgrade_settings( $previous_version, $new_version ) {
32303236
// Save to DB.
32313237
$setting->save_value();
32323238
}
3233-
32343239
}
32353240
}

php/class-plugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ protected function setup_endpoints() {
597597
* The Cloudinary Video Player version.
598598
*/
599599
if ( ! defined( 'CLOUDINARY_ENDPOINTS_VIDEO_PLAYER_VERSION' ) ) {
600-
define( 'CLOUDINARY_ENDPOINTS_VIDEO_PLAYER_VERSION', '1.9.0' );
600+
define( 'CLOUDINARY_ENDPOINTS_VIDEO_PLAYER_VERSION', '1.10.1' );
601601
}
602602
}
603603

@@ -633,7 +633,7 @@ public function autoload( $class ) {
633633
$namespace = trim( implode( DIRECTORY_SEPARATOR, $namespace ) );
634634

635635
// Get the path to our files.
636-
$directory = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . '../php';
636+
$directory = __DIR__ . DIRECTORY_SEPARATOR . '../php';
637637
if ( ! empty( $namespace ) ) {
638638
$directory .= DIRECTORY_SEPARATOR . strtolower( $namespace );
639639
}

0 commit comments

Comments
 (0)