d7ac23d39b
Various updates for React Native Windows **Docs** * Fixed windows installation in readme * Added local dev setup instructions **Build** * Added VS solutions for RNW 0.61, 0.62, and 0.63+ * Added clang-formatting definition **Features** * Fixed autolinking for RNW 0.63+ * Added support for `rate` property **Examples** * Upgraded examples/basic to RN 0.61 and replaced broken windows app
51 lines
1.3 KiB
C++
51 lines
1.3 KiB
C++
#include "pch.h"
|
|
|
|
#include "App.h"
|
|
#include "ReactPackageProvider.h"
|
|
|
|
#include "winrt/ReactNativeVideoCPP.h"
|
|
|
|
using namespace winrt::VideoPlayer;
|
|
using namespace winrt::VideoPlayer::implementation;
|
|
|
|
/// <summary>
|
|
/// Initializes the singleton application object. This is the first line of
|
|
/// authored code executed, and as such is the logical equivalent of main() or
|
|
/// WinMain().
|
|
/// </summary>
|
|
App::App() noexcept
|
|
{
|
|
MainComponentName(L"VideoPlayer");
|
|
|
|
#if BUNDLE
|
|
JavaScriptBundleFile(L"index.windows");
|
|
InstanceSettings().UseWebDebugger(false);
|
|
InstanceSettings().UseFastRefresh(false);
|
|
#else
|
|
JavaScriptMainModuleName(L"index");
|
|
InstanceSettings().UseWebDebugger(true);
|
|
InstanceSettings().UseFastRefresh(true);
|
|
#endif
|
|
|
|
#if _DEBUG
|
|
InstanceSettings().EnableDeveloperMenu(true);
|
|
#else
|
|
InstanceSettings().EnableDeveloperMenu(false);
|
|
#endif
|
|
|
|
PackageProviders().Append(make<ReactPackageProvider>()); // Includes all modules in this project
|
|
|
|
PackageProviders().Append(winrt::ReactNativeVideoCPP::ReactPackageProvider());
|
|
|
|
REACT_REGISTER_NATIVE_MODULE_PACKAGES(); //code-gen macro from autolink
|
|
|
|
InitializeComponent();
|
|
|
|
// This works around a cpp/winrt bug with composable/aggregable types tracked
|
|
// by 22116519
|
|
AddRef();
|
|
m_inner.as<::IUnknown>()->Release();
|
|
}
|
|
|
|
|