⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 settingcheck.as

📁 最为强大的个人版播客系统!专用的个人视频源码
💻 AS
字号:
//Created by Action Script Viewer - http://www.buraks.com/asv
    class com.fivesix.SettingCheck
    {
        var video, user_cam, broadcastMessage;
        function SettingCheck (target_video) {
            video = target_video;
            user_cam = Camera.get();
        }
        function startCheck() {
            this.broadcastMessage("onStarted");
            checkMic();
        }
        function checkMic() {
            var _local2 = Microphone.names;
            var _local3 = Camera.names;
            if (_local2.length < 1) {
                this.broadcastMessage("onMicNotFound");
            } else if (_local3.length < 1) {
                this.broadcastMessage("onCamNotFound");
            } else {
                checkAllowable();
             }
        }
        function checkAllowable() {
            var owner = this;
            var _local2 = Microphone.get();
            var _local3 = new NetConnection ();
            _local3.connect(null);
            var test_ns = new NetStream (_local3);
            test_ns.attachAudio(_local2);
            _local2.onStatus = function (infoObj) {
                if (infoObj.code == "Microphone.Unmuted") {
                    test_ns.attachAudio(null);
                    test_ns.close();
                    owner.checkCamBusy();
                } else {
                    owner.broadcastMessage("onCamBlockedByUser");
                 }
            };
            if (_local2.muted || (user_cam.muted)) {
                this.broadcastMessage("onCamBlocked");
            } else {
                test_ns.attachAudio(null);
                test_ns.close();
                checkCamBusy();
             }
        }
        function checkCamBusy() {
            function callback() {
                if (owner.user_cam.currentFps > 0) {
                    owner.video.attachVideo(null);
                    owner.broadcastMessage("onFinished");
                    clearInterval(intervalID);
                } else {
                    chkTime++;
                    if (chkTime > 30) {
                        owner.video.attachVideo(null);
                        owner.broadcastMessage("onCamBusy");
                        clearInterval(intervalID);
                    }
                 }
            }
            this.broadcastMessage("onCheckCamBusy");
            video.attachVideo(user_cam);
            var owner = this;
            var chkTime = 0;
            var intervalID;
            intervalID = setInterval(callback, 50);
        }
        static var broadcastInit = AsBroadcaster.initialize(com.fivesix.SettingCheck.prototype);
    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -