Ejemplo n.º 1
0
        public static PlayerSource ParsePlayerSourceJs(string rawJs)
        {
            if (rawJs.IsBlank())
            {
                throw new ArgumentNullException(nameof(rawJs));
            }

            var result = new PlayerSource();

            result.ScramblingOperations = ParseScramblingOperationsJs(rawJs).ToArray();

            return(result);
        }
Ejemplo n.º 2
0
        public static PlayerSource PlayerSourceFromJs(string rawJs)
        {
            if (rawJs.IsBlank())
            {
                throw new ArgumentNullException(nameof(rawJs));
            }

            // Get cipher operations
            var operations = CipherOperationsFromJs(rawJs).ToArray();

            // Populate
            var result = new PlayerSource();

            result.CipherOperations = operations;

            return(result);
        }