@@ -138,6 +138,13 @@ export default class ApiVideoPlayer extends React.Component<ApiVideoPlayerProps,
138138 this . playerSdk . addEventListener ( "userinactive" , ( ) => this . props . onUserInactive && this . props . onUserInactive ( ) ) ;
139139 this . playerSdk . addEventListener ( "volumechange" , ( v ) => this . props . onVolumeChange && this . props . onVolumeChange ( v . volume ) ) ;
140140
141+ if ( this . props . videoStyleObjectFit ) {
142+ this . playerSdk . setVideoStyleObjectFit ( this . props . videoStyleObjectFit ) ;
143+ }
144+
145+ if ( this . props . videoStyleTransform ) {
146+ this . playerSdk . setVideoStyleTransform ( this . props . videoStyleTransform ) ;
147+ }
141148
142149 this . playerSdk . addEventListener ( "ready" , ( ) => {
143150 this . playerSdk . getVolume ( ) . then ( d => this . props . onVolumeChange && this . props . onVolumeChange ( d ) ) ;
@@ -206,11 +213,11 @@ export default class ApiVideoPlayer extends React.Component<ApiVideoPlayerProps,
206213 if ( nextProps . playbackRate !== undefined && nextProps . playbackRate !== this . props . playbackRate ) {
207214 this . playerSdk . setPlaybackRate ( nextProps . playbackRate ) ;
208215 }
209- if ( nextProps . videoStyleObjectFit !== undefined && nextProps . videoStyleObjectFit !== this . props . videoStyleObjectFit ) {
210- this . playerSdk . setVideoStyleObjectFit ( nextProps . videoStyleObjectFit ) ;
216+ if ( nextProps . videoStyleObjectFit !== this . props . videoStyleObjectFit ) {
217+ this . playerSdk . setVideoStyleObjectFit ( nextProps . videoStyleObjectFit || "none" ) ;
211218 }
212- if ( nextProps . videoStyleTransform !== undefined && nextProps . videoStyleTransform !== this . props . videoStyleTransform ) {
213- this . playerSdk . setVideoStyleTransform ( nextProps . videoStyleTransform ) ;
219+ if ( nextProps . videoStyleTransform !== this . props . videoStyleTransform ) {
220+ this . playerSdk . setVideoStyleTransform ( nextProps . videoStyleTransform || "" ) ;
214221 }
215222
216223 if ( nextProps . controls !== undefined ) {
0 commit comments