public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			// Perform the internal wiring to be able to make use of the BrightcovePlayerFragment.
			View view = inflater.inflate(R.layout.basic_cast_fragment, container, false);
			brightcoveVideoView = (BrightcoveVideoView) view.findViewById(R.id.brightcove_video_view);
			eventEmitter = brightcoveVideoView.EventEmitter;
			base.onCreateView(inflater, container, savedInstanceState);

			// Initialize the android_cast_plugin which requires the application id of your Cast
			// receiver application.
			string applicationId = Resources.getString([email protected]_id);
			googleCastComponent = new GoogleCastComponent(eventEmitter, applicationId, Activity);

			// Initialize the MiniController widget which will allow control of remote media playback.
			miniController = (MiniController) view.findViewById(R.id.miniController1);
			IDictionary<string, object> properties = new Dictionary<string, object>();
			properties[GoogleCastComponent.CAST_MINICONTROLLER] = miniController;
			eventEmitter.emit(GoogleCastEventType.SET_MINI_CONTROLLER, properties);

			// Send the location of the media (url) and its metadata information for remote playback.
			Resources resources = Resources;
			string title = resources.getString([email protected]_title);
			string studio = resources.getString([email protected]_studio);
			string url = resources.getString([email protected]_url);
			string thumbnailUrl = resources.getString([email protected]_thumbnail);
			string imageUrl = resources.getString([email protected]_image);
			eventEmitter.emit(GoogleCastEventType.SET_MEDIA_METADATA, buildMetadataProperties("subTitle", title, studio, thumbnailUrl, imageUrl, url));

			brightcoveVideoView.VideoPath = url;

			return view;
		}
Example #2
0
        public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Perform the internal wiring to be able to make use of the BrightcovePlayerFragment.
            View view = inflater.inflate(R.layout.basic_cast_fragment, container, false);

            brightcoveVideoView = (BrightcoveVideoView)view.findViewById(R.id.brightcove_video_view);
            eventEmitter        = brightcoveVideoView.EventEmitter;
            base.onCreateView(inflater, container, savedInstanceState);

            // Initialize the android_cast_plugin which requires the application id of your Cast
            // receiver application.
            string applicationId = Resources.getString([email protected]_id);

            googleCastComponent = new GoogleCastComponent(eventEmitter, applicationId, Activity);

            // Initialize the MiniController widget which will allow control of remote media playback.
            miniController = (MiniController)view.findViewById(R.id.miniController1);
            IDictionary <string, object> properties = new Dictionary <string, object>();

            properties[GoogleCastComponent.CAST_MINICONTROLLER] = miniController;
            eventEmitter.emit(GoogleCastEventType.SET_MINI_CONTROLLER, properties);

            // Send the location of the media (url) and its metadata information for remote playback.
            Resources resources    = Resources;
            string    title        = resources.getString([email protected]_title);
            string    studio       = resources.getString([email protected]_studio);
            string    url          = resources.getString([email protected]_url);
            string    thumbnailUrl = resources.getString([email protected]_thumbnail);
            string    imageUrl     = resources.getString([email protected]_image);

            eventEmitter.emit(GoogleCastEventType.SET_MEDIA_METADATA, buildMetadataProperties("subTitle", title, studio, thumbnailUrl, imageUrl, url));

            brightcoveVideoView.VideoPath = url;

            return(view);
        }