private void InitOoyala()
        {
            PlayerDomain       playerDomain       = new PlayerDomain(_domain);
            var                options            = new Options.Builder().SetUseExoPlayer(true).Build();
            OoyalaPlayerLayout ooyalaPlayerLayout = FindViewById <OoyalaPlayerLayout>(Resource.Id.ooyalaPlayer);

            _player = new OoyalaPlayer(_pcode, playerDomain, options);
            var controller = new OoyalaPlayerLayoutController(ooyalaPlayerLayout, _player);

            _castManager.RegisterWithOoyalaPlayer(_player);
            _player.AddObserver(this);
            Play(_embedCode);
        }
Beispiel #2
0
        public void Run(
            IEnumerable <string> artifacts,
            DirectoryInfo source,
            DirectoryInfo output,
            Uri url,
            IEnumerable <Uri> additionalUrls,
            bool urlOnlyIndex,
            string repoName,
            string filename,
            string verbosity)
        {
            SetupLogger(verbosity);
            var configInfo = new AutoProjectConfigurationProvider().Create(source.FullName);

            Log.Debug("Using configuration: {@Config}", configInfo);
            if (configInfo.Configuration.FormatProvider == ProjectFormatProviderType.Gitree)
            {
                Log.Warning("Gitree feature is a Work In Progress. It may not work as expected, or at all.");
            }

            var artifactTypes = artifacts
                                .Distinct()
                                .Select(ParseArtifactType)
                                .Where(x => x != ArtifactType.None)
                                .ToImmutableArray();

            if (artifactTypes.Length == 0)
            {
                Log.Information("Nothing to do.");
                return;
            }
            output ??= new DirectoryInfo(configInfo.Configuration.OutputPath);
            Log.Debug("Writing artifacts to: {Destination}", output);
            output.Create();

            Log.Debug("Loading workspace...");
            var workspace = ReadWorkspaceFromConfig(configInfo);

            Log.Debug(
                "Workspace loaded. {DatafileCount} datafiles discovered.",
                workspace.Datafiles.Count(x => x.DataKind.IsDataCatalogueKind()));

            CheckBattleScribeVersionCompatibility(workspace);

            var resolvedRepoName = string.IsNullOrWhiteSpace(repoName) ? GetRepoNameFallback(workspace) : repoName;

            Log.Debug("Repository name used is: {RepoName}", resolvedRepoName);

            var resolvedFilename = string.IsNullOrWhiteSpace(filename) ? source.Name : filename;

            var options = new Options.Builder
            {
                Artifacts      = artifactTypes,
                Source         = source,
                Output         = output,
                Url            = url,
                AdditionalUrls = additionalUrls?.ToImmutableArray() ?? ImmutableArray <Uri> .Empty,
                RepoName       = resolvedRepoName,
                Filename       = resolvedFilename,
                UrlOnlyIndex   = urlOnlyIndex
            }.ToImmutable();

            foreach (var artifactType in options.Artifacts)
            {
                CreateArtifact(workspace, options, artifactType);
            }
            Log.Verbose("All done.");
        }