Skip to content

Commit

Permalink
Renaming Boolean etc to AsBoolean (TheWidlarzGroup#2119)
Browse files Browse the repository at this point in the history
  • Loading branch information
tero-paananen authored and brianpmarks committed May 28, 2021
1 parent 3d758c4 commit a2d5df4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions windows/ReactNativeVideoCPP/ReactVideoViewManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,28 +64,28 @@ void ReactVideoViewManager::UpdateProperties(
auto const &propertyValue = pair.second;
if (!propertyValue.IsNull()) {
if (propertyName == "src") {
auto const &srcMap = propertyValue.Object();
auto const &srcMap = propertyValue.AsObject();
auto const &uri = srcMap.at("uri");
reactVideoView.Set_UriString(to_hstring(uri.String()));
reactVideoView.Set_UriString(to_hstring(uri.AsString()));
} else if (propertyName == "resizeMode") {
reactVideoView.Stretch(static_cast<Stretch>(std::stoul(propertyValue.String())));
reactVideoView.Stretch(static_cast<Stretch>(std::stoul(propertyValue.AsString())));
} else if (propertyName == "repeat") {
reactVideoView.Set_IsLoopingEnabled(propertyValue.Boolean());
reactVideoView.Set_IsLoopingEnabled(propertyValue.AsBoolean());
} else if (propertyName == "paused") {
m_paused = propertyValue.Boolean();
m_paused = propertyValue.AsBoolean();
reactVideoView.Set_Paused(m_paused);
} else if (propertyName == "muted") {
reactVideoView.Set_Muted(propertyValue.Boolean());
reactVideoView.Set_Muted(propertyValue.AsBoolean());
} else if (propertyName == "volume") {
reactVideoView.Set_Volume(propertyValue.Double());
reactVideoView.Set_Volume(propertyValue.AsDouble());
} else if (propertyName == "seek") {
reactVideoView.Set_Position(propertyValue.Double());
reactVideoView.Set_Position(propertyValue.AsDouble());
} else if (propertyName == "controls") {
reactVideoView.Set_Controls(propertyValue.Boolean());
reactVideoView.Set_Controls(propertyValue.AsBoolean());
} else if (propertyName == "fullscreen") {
reactVideoView.Set_FullScreen(propertyValue.Boolean());
reactVideoView.Set_FullScreen(propertyValue.AsBoolean());
} else if (propertyName == "progressUpdateInterval") {
reactVideoView.Set_ProgressUpdateInterval(propertyValue.Int64());
reactVideoView.Set_ProgressUpdateInterval(propertyValue.AsInt64());
}
}
}
Expand Down

0 comments on commit a2d5df4

Please sign in to comment.