protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); mPlayerView = FindViewById <JWPlayerView>(Resource.Id.jwplayer); TextView outputTextView = FindViewById <TextView>(Resource.Id.output); toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar); // Handle hiding/showing of ActionBar SetSupportActionBar(toolbar); mPlayerView.AddOnFullscreenListener(this); // Instantiate the JW Player event handler class mEventHandler = new JWEventHandler(mPlayerView, outputTextView); // Load a media source PlaylistItem pi = new PlaylistItem("http://playertest.longtailvideo.com/adaptive/bipbop/gear4/prog_index.m3u8"); mPlayerView.Load(pi); mCastManager = CastManager.Instance; mCastManager.AddDeviceListener(new DeviceListener()); mCastManager.AddPlayerListener(new PlayerListener()); mCastManager.AddApplicationListener(new ApplicationListener()); mCastManager.AddConnectionListener(new ConnectionListener()); mCastManager.AddErrorListener(new ErrorListener()); }