Skip to content

Commit

Permalink
Update ios/RNPlayerViewManager.swift
Browse files Browse the repository at this point in the history
Co-authored-by: Roland Kákonyi <[email protected]>
  • Loading branch information
jonathanm-tkf and rolandkakonyi authored Oct 13, 2023
1 parent 93ff4af commit efa4217
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions ios/RNPlayerViewManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,15 @@ class RNPlayerViewManager: RCTViewManager {
guard let playerView = view.playerView else {
return
}
if scalingMode == "Zoom" {
playerView.scalingMode = ScalingMode.zoom
} else if scalingMode == "Stretch" {
playerView.scalingMode = ScalingMode.stretch
} else {
playerView.scalingMode = ScalingMode.fit
switch scalingMode {
case "Zoom":
playerView.scalingMode = .zoom
case "Stretch":
playerView.scalingMode = .stretch
case "Fit":
playerView.scalingMode = .fit
default:
break
}
}
}
Expand Down

0 comments on commit efa4217

Please sign in to comment.