zoukankan      html  css  js  c++  java
  • 在FlashCom中检测摄像头和麦克风的方法

    //检查摄像头 
    function CheckForCam() { 
    camArray = Camera.names; 
    if (camArray.length >= 1){ 
    temp_cam = Camera.get(); 
    if(temp_cam == -1) { 
    trace('--- cam is detected but its busy'); 
    return -1; } 
    else { 
    trace('--- cam detected'); 
    return 1; } 
    delete temp_cam; 
    } else if (camArray.length == 0) { 
    trace('--- no cam detected'); 
    return 0; 
    // 检查麦克风 
    function CheckForMic() { 
    micArray = Microphone.names;; 
    if (micArray.length >= 1){ 
    temp_mic = Microphone.get(); 
    if(temp_mic == -1) { 
    trace('--- mic is detected but its busy'); 
    return -1; } 
    else { 
    trace('--- mic detected'); 
    return 1; } 
    delete temp_mic; 
    } else if (micArray.length == 0) { 
    trace('--- no Mic detected'); 
    return 0; 
    }
  • 相关阅读:
    vue中v-slot使用
    Angular服务
    Angular的使用
    Angular介绍
    缓存组件
    mvvm和mvc的区别
    vue项目优化
    windows环境安装和使用curl与ES交互
    Java自定义注解
    ajax异步请求后台数据处理
  • 原文地址:https://www.cnblogs.com/top5/p/2340097.html
Copyright © 2011-2022 走看看