Example #1
0
        private void setup()
        {
            // assume we are only doing WebRTC engine

            // instantiate the engine
            this.engine = new SymplePlayerEngineWebRTC(this);
            this.engine.setup();
        }
Example #2
0
        public SymplePlayer(SymplePlayerOptions opts)
        {
            this.options               = opts;
            this.options.format        = "MJPEG";
            this.options.engine        = null;
            this.options.onCommand     = (player, cmd) => { };
            this.options.onStateChange = (player, state, message) => { };

            if (this.options.engine == null)
            {
                var engine = SympleMedia.Instance.preferredCompatibleEngine(this.options.format);
                if (engine != null)
                {
                    this.options.engine = engine.id;
                }
            }

            //this.bindEvents(); // here we would set up the event logic to bind UI buttons to actions like play/stop/mute/unmute/etc
            this.playing = false;
        }