Ir para conteúdo
Fórum Script Brasil
  • 0

Vídeo e som pelo FireFox


Rodrigo26

Pergunta

Bom dia,

Estou fazendo testes no FireFox e percebi que mesmo com os plug-ins instalados o mesmo não roda nem som e nem vídeo.

O exempo que fiz está correto?

<embed src="Beyonce_Single_Ladies.rv" width="640" height="480" />
Este exemplo requer o plug-in do real play instalado. http://brazil.real.com/realplayer/?rppr=rnwk Plug-in para este vídeo http://www.apple.com/br/safari/download/plugins.html Plug-ins Caso tenha dúvidas de quais plug-ins se encontra instalado no seu navegador, crie este documento HTML e o execute.
<html>
<head>
<script language="JavaScript1.1"> 
<!--
javascriptVersion1_1 = true;

var detectableWithVB = false;
var pluginFound = false;


function goURL(daURL) {
    if(javascriptVersion1_1) {
    window.location.replace(daURL);
    } else {
    window.location = daURL;
    }
    return;
}

function redirectCheck(pluginFound, redirectURL, redirectIfFound) {
    if( redirectURL && ((pluginFound && redirectIfFound) || 
    (!pluginFound && !redirectIfFound)) ) {
    goURL(redirectURL);
    return pluginFound;
    } else {
    return pluginFound;
    }    
}

function canDetectPlugins() {
    if( detectableWithVB || (navigator.plugins && navigator.plugins.length > 0) ) {
    return true;
    } else {
    return false;
    }
}

function detectFlash(redirectURL, redirectIfFound) {
    pluginFound = detectPlugin('Shockwave','Flash'); 
    if(!pluginFound && detectableWithVB) {
    pluginFound = detectActiveXControl('ShockwaveFlash.ShockwaveFlash.1');
    }
    return redirectCheck(pluginFound, redirectURL, redirectIfFound);
}



function detectQuickTime(redirectURL, redirectIfFound) {
    pluginFound = detectPlugin('QuickTime');
    if(!pluginFound && detectableWithVB) {
    pluginFound = detectQuickTimeActiveXControl();
    }
    return redirectCheck(pluginFound, redirectURL, redirectIfFound);
}

function detectReal(redirectURL, redirectIfFound) {
    pluginFound = detectPlugin('RealPlayer');
    if(!pluginFound && detectableWithVB) {
    pluginFound = (detectActiveXControl('rmocx.RealPlayer G2 Control') ||
               detectActiveXControl('RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)') ||
               detectActiveXControl('RealVideo.RealVideo(tm) ActiveX Control (32-bit)'));
    }    
    return redirectCheck(pluginFound, redirectURL, redirectIfFound);
}

function detectWindowsMedia(redirectURL, redirectIfFound) {
    pluginFound = detectPlugin('Windows Media');
    if(!pluginFound && detectableWithVB) {
    pluginFound = detectActiveXControl('MediaPlayer.MediaPlayer.1');
    }
    return redirectCheck(pluginFound, redirectURL, redirectIfFound);
}

function detectPlugin() {
    var daPlugins = detectPlugin.arguments;
    var pluginFound = false;
    if (navigator.plugins && navigator.plugins.length > 0) {
    var pluginsArrayLength = navigator.plugins.length;
    for (pluginsArrayCounter=0; pluginsArrayCounter < pluginsArrayLength; pluginsArrayCounter++ ) {
        var numFound = 0;
        for(namesCounter=0; namesCounter < daPlugins.length; namesCounter++) {
           if( (navigator.plugins[pluginsArrayCounter].name.indexOf(daPlugins[namesCounter]) >= 0) || 
               (navigator.plugins[pluginsArrayCounter].description.indexOf(daPlugins[namesCounter]) >= 0) ) {
               numFound++;
           }   
        }
        if(numFound == daPlugins.length) {
        pluginFound = true;
        break;
        }
    }
    }
    return pluginFound;
} // detectPlugin


// Here we write out the VBScript block for MSIE Windows
if ((navigator.userAgent.indexOf('MSIE') != -1) && (navigator.userAgent.indexOf('Win') != -1)) {
    document.writeln('<script language="VBscript">');

    document.writeln('\'do a one-time test for a version of VBScript that can handle this code');
    document.writeln('detectableWithVB = False');
    document.writeln('If ScriptEngineMajorVersion >= 2 then');
    document.writeln('  detectableWithVB = True');
    document.writeln('End If');

    document.writeln('\'this next function will detect most plugins');
    document.writeln('Function detectActiveXControl(activeXControlName)');
    document.writeln('  on error resume next');
    document.writeln('  detectActiveXControl = False');
    document.writeln('  If detectableWithVB Then');
    document.writeln('     detectActiveXControl = IsObject(CreateObject(activeXControlName))');
    document.writeln('  End If');
    document.writeln('End Function');

    document.writeln('\'and the following function handles QuickTime');
    document.writeln('Function detectQuickTimeActiveXControl()');
    document.writeln('  on error resume next');
    document.writeln('  detectQuickTimeActiveXControl = False');
    document.writeln('  If detectableWithVB Then');
    document.writeln('    detectQuickTimeActiveXControl = False');
    document.writeln('    hasQuickTimeChecker = false');
    document.writeln('    Set hasQuickTimeChecker = CreateObject("QuickTimeCheckObject.QuickTimeCheck.1")');
    document.writeln('    If IsObject(hasQuickTimeChecker) Then');
    document.writeln('      If hasQuickTimeChecker.IsQuickTimeAvailable(0) Then ');
    document.writeln('        detectQuickTimeActiveXControl = True');
    document.writeln('      End If');
    document.writeln('    End If');
    document.writeln('  End If');
    document.writeln('End Function');

    document.writeln('</scr' + 'ipt>');
}
// -->
</script> 
</head>
<body>
<script language="JavaScript"> 

document.write('<br><b>Possibilidade de detectar Plugins:</b> ' + canDetectPlugins() + '<br><br>');

if(canDetectPlugins()) {
    document.write('<b>Suporte ao Flash Player:</b> ' + detectFlash() + '<br>' + 
           '<b>Suporte ao QuickTime:</b> ' + detectQuickTime() + '<br>' +
           '<b>Suporte ao RealPlayer:</b> ' + detectReal() + '<br>' +
           '<b>Suporte ao Windows Media Player:</b> ' + detectWindowsMedia());
}
</script>

<noscript>
Seu navegador não suporta JavaScript
</noscript>


</body>
</html>

Obrigado,

Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      651,9k
×
×
  • Criar Novo...