Renaming Boolean etc to AsBoolean (#2119)

This commit is contained in:
Tero Paananen 2020-09-30 21:27:39 +03:00 committed by GitHub
parent f653589ecd
commit faf8aed29b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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());
}
}
}