Jump to content
Fivewin Brasil

Execute um vídeo incorporado do YouTube com o ActiveX


kapiaba

Recommended Posts

#include "fivewin.ch"
	STATIC oWnd
	#define  HKEY_LOCAL_MACHINE      2147483650
	FUNCTION Ejemplo()
	   local oWndChild, oActiveX
   local cFile, cPath, cHtml
	   cHtml := ''
   cHtml += '<html>' + CRLF
   cHtml += '<body>' + CRLF
   cHtml += '<div id="vid" align="center">' + CRLF
   cHtml += '<iframe width="560" height="315" src="https://www.youtube.com/embed/i93Z7zljQ7I" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe>' + CRLF
   cHtml += '</div>' + CRLF
   cHtml += '</body>' + CRLF
   cHtml += '</html>' + CRLF
   cHtml += CRLF
	   cPath := cFilePath(GetModuleFileName(GetInstance()))
	   cFile := cPath + "video.html"
	   FErase(cFile)
   MemoWrit( cFile, cHtml )
	   /*
  http://fivewin.com.br/index.php?/topic/27339-problema-na-busca-do-cnpj-site-da-receita/
	  http://forums.fivetechsupport.com/viewtopic.php?f=6&t=34901
   */
   INTER_APP_WEB_CONFIG("VIDEOAC.exe",11001)
	   DEFINE WINDOW oWnd TITLE "Video"
	   oActiveX := TActiveX():New( oWnd, "Shell.Explorer.2" )
	   oActivex:Silent := .T.
   oActivex:SetFocus()
	   oWnd:oClient := oActiveX
   oWnd:Resize()
	   oActiveX:Do( "Navigate2", cFile )
	   ACTIVATE WINDOW oWnd
	RETURN NIL
/*
Parametrize seu programa com a versão do seu navegador atual.
	Ex: se seu navegador for iexplorer 11 coloque assim
	INTER_APP_WEB_CONFIG("SeuPrograma.exe",11001)
*/
	FUNCTION INTER_APP_WEB_CONFIG(f_cNameProg,f_nVersion_IE)
	   Local oRegKey, cRegProgGet, lDeleteKey := .f.
  
   Default f_nVersion_IE := 11001
	   if IsWow64()
    
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION" )
      oRegKey:Set(f_cNameProg,f_nVersion_IE,4)
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_AJAX_CONNECTIONEVENTS" )
      oRegKey:Set(f_cNameProg,0,4)  // Padrão 0
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_ZONE_ELEVATION" )
      oRegKey:Set(f_cNameProg,0,4)  // Padrão 1
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_READ_ZONE_STRINGS_FROM_REGISTRY" )
      oRegKey:Set(f_cNameProg,1,4)  // Padrão 0
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BEHAVIORS" )
      oRegKey:Set(f_cNameProg,1,4)
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_ENABLE_WEB_CONTROL_VISUALS" )
      oRegKey:Set(f_cNameProg,1,4)
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_SHOW_APP_PROTOCOL_WARN_DIALOG" )
      oRegKey:Set(f_cNameProg,1,4) // Padrao 0
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_GPU_RENDERING" )
      oRegKey:Set(f_cNameProg,1,4) // Padrao 0
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_NINPUT_LEGACYMODE" )
      oRegKey:Set(f_cNameProg,0,4) // Padrao 1
      oRegKey:Close()
	
   Else
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION" )
      oRegKey:Set(f_cNameProg,f_nVersion_IE,4)
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BEHAVIORS" )
      cRegProgGet := oRegKey:GetBinary(f_cNameProg)
      //? cRegProgGet
      If Empty(cRegProgGet)
        oRegKey:Set(f_cNameProg,1,4)
      EndIf
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_ENABLE_WEB_CONTROL_VISUALS" )
        oRegKey:Set(f_cNameProg,1,4)
      oRegKey:Close()
	   EndIf
	RETURN NIL

Link to comment
Share on other sites

Tela Cheia:

 

#include "fivewin.ch"
	STATIC oWnd
	#define  HKEY_LOCAL_MACHINE      2147483650
	FUNCTION Ejemplo()
	   local oWndChild, oActiveX
   local cFile, cPath, cHtml
	   // botao direito do mouse, copiar codigo para incorporacao no youtube.
   cHtml := ''
   cHtml += '<html>' + CRLF
   cHtml += '<body>' + CRLF
   cHtml += '<div id="vid" align="center">' + CRLF
   // cHtml += '<iframe width="560" height="315" src="https://www.youtube.com/embed/i93Z7zljQ7I" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe>' + CRLF
   // FULL SCREEN - PANTALLA COMPLETA - TELA CHEIA.
   // botao direito do mouse, copiar codigo para incorporacao no youtube.
   cHtml += '<iframe width="1024" height="637" src="https://www.youtube.com/embed/i93Z7zljQ7I" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe>' + CRLF
   cHtml += '</div>' + CRLF
   cHtml += '</body>' + CRLF
   cHtml += '</html>' + CRLF
   cHtml += CRLF
	   cPath := cFilePath(GetModuleFileName(GetInstance()))
	   cFile := cPath + "video.html"
	   FErase(cFile)
   MemoWrit( cFile, cHtml )
	   /*
  http://fivewin.com.br/index.php?/topic/27339-problema-na-busca-do-cnpj-site-da-receita/
	  http://forums.fivetechsupport.com/viewtopic.php?f=6&t=34901
   */
   INTER_APP_WEB_CONFIG("VIDEOAC.exe",11001)
	   DEFINE WINDOW oWnd TITLE "Video"
	   oActiveX := TActiveX():New( oWnd, "Shell.Explorer.2" )
	   oActivex:Silent := .T.
   oActivex:SetFocus()
	   oWnd:oClient := oActiveX
   oWnd:Resize()
	   oActiveX:Do( "Navigate2", cFile )
	   ACTIVATE WINDOW oWnd MAXIMIZED
	RETURN NIL
/*
Parametrize seu programa com a versão do seu navegador atual.
	Ex: se seu navegador for iexplorer 11 coloque assim
	INTER_APP_WEB_CONFIG("SeuPrograma.exe",11001)
*/
	FUNCTION INTER_APP_WEB_CONFIG(f_cNameProg,f_nVersion_IE)
	   Local oRegKey, cRegProgGet, lDeleteKey := .f.
  
   Default f_nVersion_IE := 11001
	   if IsWow64()
    
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION" )
      oRegKey:Set(f_cNameProg,f_nVersion_IE,4)
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_AJAX_CONNECTIONEVENTS" )
      oRegKey:Set(f_cNameProg,0,4)  // Padrão 0
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_ZONE_ELEVATION" )
      oRegKey:Set(f_cNameProg,0,4)  // Padrão 1
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_READ_ZONE_STRINGS_FROM_REGISTRY" )
      oRegKey:Set(f_cNameProg,1,4)  // Padrão 0
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BEHAVIORS" )
      oRegKey:Set(f_cNameProg,1,4)
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_ENABLE_WEB_CONTROL_VISUALS" )
      oRegKey:Set(f_cNameProg,1,4)
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_SHOW_APP_PROTOCOL_WARN_DIALOG" )
      oRegKey:Set(f_cNameProg,1,4) // Padrao 0
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_GPU_RENDERING" )
      oRegKey:Set(f_cNameProg,1,4) // Padrao 0
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_NINPUT_LEGACYMODE" )
      oRegKey:Set(f_cNameProg,0,4) // Padrao 1
      oRegKey:Close()
	
   Else
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION" )
      oRegKey:Set(f_cNameProg,f_nVersion_IE,4)
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BEHAVIORS" )
      cRegProgGet := oRegKey:GetBinary(f_cNameProg)
      //? cRegProgGet
      If Empty(cRegProgGet)
        oRegKey:Set(f_cNameProg,1,4)
      EndIf
      oRegKey:Close()
	      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE,;
           "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_ENABLE_WEB_CONTROL_VISUALS" )
        oRegKey:Set(f_cNameProg,1,4)
      oRegKey:Close()
	   EndIf
	RETURN NIL


 

Link to comment
Share on other sites

outros streams para teste e autoredimensionar em iframe...pequena alteracao no INTER_APP_WEB_CONFIG 

compilar: buildx v8  em \fwh\samples\

NOTE v8.prg

#include "FiveWin.ch"

#define  HKEY_LOCAL_MACHINE     2147483650

Function Main()
Local oWnd, oBar, oFont, oActiveX, oCombo, nCombo := 1

   INTER_APP_WEB_CONFIG()

   DEFINE FONT oFont NAME "Arial" SIZE 0, -12

   DEFINE WINDOW oWnd TITLE "ISS live ustream TESTE"
   DEFINE BUTTONBAR oBar SIZE 33, 33 OF oWnd
   DEFINE BUTTON OF oBar FILE "..\bitmaps\window.bmp" MESSAGE "ISS live ustream" ACTION (oActiveX:Do("Navigate2", Link(1)), oWnd:SetText("ISS live ustream"), oWnd:Refresh())
   DEFINE BUTTON OF oBar FILE "..\bitmaps\window.bmp" MESSAGE "ISS live ustream cam2" ACTION (oActiveX:Do("Navigate2", Link(6)), oWnd:SetText("ISS live ustream"), oWnd:Refresh())
   DEFINE BUTTON OF oBar FILE "..\bitmaps\window.bmp" MESSAGE "tv diario ceara" ACTION (oActiveX:Do("Navigate2", Link(4)), oWnd:SetText("tv diario (Online) ceara"), oWnd:Refresh())
   DEFINE BUTTON OF oBar FILE "..\bitmaps\Exit.bmp"   MESSAGE "Sair" GROUP ACTION oWnd:End()

   @ 0.5, 20 COMBOBOX oCombo VAR nCombo ITEMS {"ISS live ustream", "youtube1", "youtube2", "tv diario", "Escuta AéreaGALEÃO Rio", "ISS live ustream cam2"} OF oBar SIZE 160, 200 FONT oFont ON CHANGE (oActiveX:Do("Navigate2", Link(nCombo)), oWnd:SetText("stream No.: "+Alltrim(str(nCombo))), oWnd:Refresh())

   oActiveX := TActiveX():New( oWnd, "Shell.Explorer.2" )
   oActivex:Silent := .t.
   oWnd:oClient := oActiveX

   SET MESSAGE OF oWnd TO FWVERSION NOINSET CLOCK DATE KEYBOARD

   ACTIVATE WINDOW oWnd ON INIT oActiveX:Do("Navigate2", Link(1))

Return nil
//------------------------------------------------------------------------------------
Function Link(nlink)
Local cPath, cFile, cHtml := ''

   cPath := cFilePath(GetModuleFileName(GetInstance()))
   cFile := cPath + "v8.html"
   fErase(cFile)
   If nlink = 1
      cHtml := '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" height="100%" width="100%"><param name="wmode" value="transparent"> '+;
               '<param name="flashvars" value="cid=17074538&autoplay=true"><param name="allowfullscreen" value="true"> '+;
               '<param name="allowscriptaccess" value="always"><param name="src" value="http://www.ustream.tv/flash/viewer.swf"> '+;
               '<embed flashvars="cid=17074538&autoplay=true" allowfullscreen="true" allowscriptaccess="always" src="http://www.ustream.tv/flash/viewer.swf" type="application/x-shockwave-flash" height="100%" width="100%"></object>'
   Elseif nLink = 2
      cHtml := '<iframe width="100%" height="100%" src="https://www.youtube.com/embed/LcEE8gML8Lg?autoplay=1"></iframe>'
   ElseIf nLink = 3
      cHtml := '<iframe width="100%" height="100%" src="https://www.youtube.com/embed/lLuc6rtWkrM?autoplay=1"></iframe>'
   ElseIf nLink = 4
      cHtml := '<iframe allowfullscreen="true" msallowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" width="100%" height="100%" frameborder="0" src="http://fast.player.liquidplatform.com/pApiv2/embed/7a683b067e5eee5c8d45e1e1883f69b9?title=tvdiario&autoStart=true&enableShare=false&gaAccount=UA-24105952-6&alternateLive=http://slrp.sambavideos.sambatech.com/liveevent/tvdiario_7a683b067e5eee5c8d45e1e1883f69b9/livestream/playlist.m3u8" ></iframe>'
   ElseIf nLink = 5
      cHtml := '<H2>Escuta Aérea GALEÃO Rio'
      cHtml += '<iframe width="100%" height="100%" frameborder="0" src="http://radio.server6.com.br:8282/stream"></iframe>'
   Else
      cHtml += '<iframe width="100%" height="100%" src="http://www.ustream.tv/embed/9408562?html5ui&autoplay=true" scrolling="no" allowfullscreen webkitallowfullscreen frameborder="0" style="border: 0 none transparent;"></iframe>'
   Endif
   MemoWrit(cFile, cHtml)

Return cFile
//------------------------------------------------------------------------------------
Function INTER_APP_WEB_CONFIG(nVersionIE)
Local oReg, oRegKey, cRegProgGet, lDeleteKey := .f., cNameProg, uIEver

   oReg := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Internet Explorer\" )
   uIEver := oReg:Get( "svcVersion" )

   DEFAULT nVersionIE := If(Left(Alltrim(uIEver),2)="11", 11001, )
   DEFAULT cNameProg  := Alltrim(cFileName(HB_ARGV(0)))

   If IsWow64()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION" )
      oRegKey:Set(cNameProg, nVersionIE,4)
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_AJAX_CONNECTIONEVENTS" )
      oRegKey:Set(cNameProg,0,4)  // Padrão 0
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_ZONE_ELEVATION" )
      oRegKey:Set(cNameProg,0,4)  // Padrão 1
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_READ_ZONE_STRINGS_FROM_REGISTRY" )
      oRegKey:Set(cNameProg,1,4)  // Padrão 0
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BEHAVIORS" )
      oRegKey:Set(cNameProg,1,4)
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_ENABLE_WEB_CONTROL_VISUALS" )
      oRegKey:Set(cNameProg,1,4)
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_SHOW_APP_PROTOCOL_WARN_DIALOG" )
      oRegKey:Set(cNameProg,1,4) // Padrao 0
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_GPU_RENDERING" )
      oRegKey:Set(cNameProg,1,4) // Padrao 0
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_NINPUT_LEGACYMODE" )
      oRegKey:Set(cNameProg,0,4) // Padrao 1
      oRegKey:Close()
   Else
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION" )
      oRegKey:Set(cNameProg, nVersionIE,4)
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BEHAVIORS" )
      cRegProgGet := oRegKey:GetBinary(cNameProg)
      If Empty(cRegProgGet)
         oRegKey:Set(cNameProg,1,4)
      EndIf
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_ENABLE_WEB_CONTROL_VISUALS" )
      oRegKey:Set(cNameProg,1,4)
      oRegKey:Close()
   EndIf

Return nil

 

Link to comment
Share on other sites

// Very good, many thanks!

// NOTE v8.prg
	#include "FiveWin.ch"
	#define  HKEY_LOCAL_MACHINE     2147483650
	Function Main()
	   Local oWnd, oBar, oFont, oActiveX, oCombo, nCombo := 1
	   INTER_APP_WEB_CONFIG()
	   DEFINE FONT oFont NAME "Arial" SIZE 0, -12
	   DEFINE WINDOW oWnd TITLE "ISS live ustream TESTE"
	   DEFINE BUTTONBAR oBar SIZE 33, 33 OF oWnd
	   DEFINE BUTTON OF oBar FILE "..\bitmaps\window.bmp"  ;
          MESSAGE "ISS live ustream"                   ;
          ACTION ( oActiveX:Do("Navigate2", Link(1) ), ;
                   oWnd:SetText("ISS live ustream"),   ;
                   oWnd:Refresh() )
	   DEFINE BUTTON OF oBar FILE "..\bitmaps\window.bmp"  ;
          MESSAGE "ISS live ustream cam2"              ;
          ACTION ( oActiveX:Do("Navigate2", Link(6)),  ;
                   oWnd:SetText("ISS live ustream"),   ;
                   oWnd:Refresh())
	   DEFINE BUTTON OF oBar FILE "..\bitmaps\window.bmp"  ;
          MESSAGE "Tv Diário Ceará"                    ;
          ACTION ( oActiveX:Do("Navigate2", Link(4)),  ;
                   oWnd:SetText("Tv Diário On line do Ceará-BR"), ;
                   oWnd:Refresh())
	   DEFINE BUTTON OF oBar FILE "..\bitmaps\Exit.bmp"    ;
          MESSAGE "Sair" GROUP ACTION ( oWnd:End() )
	   @ 0.5, 20 COMBOBOX oCombo VAR nCombo ;
      ITEMS { "ISS live ustream", "youtube1", "youtube2", "tv diario", ;
              "Escuta Aérea GALEÃO Rio", "ISS live ustream cam2" }     ;
      OF oBar SIZE 160, 200 FONT oFont                                 ;
      ON CHANGE (oActiveX:Do("Navigate2", Link(nCombo)),               ;
      oWnd:SetText("stream No.: "+Alltrim(str(nCombo))), oWnd:Refresh())
	   oActiveX := TActiveX():New( oWnd, "Shell.Explorer.2" )
   oActivex:Silent := .t.
   oWnd:oClient := oActiveX
	   SET MESSAGE OF oWnd TO FWVERSION NOINSET CLOCK DATE KEYBOARD
	   ACTIVATE WINDOW oWnd ON INIT oActiveX:Do("Navigate2", Link(1))
	   oFont:End()
	Return nil
//------------------------------------------------------------------------------------
Function Link(nlink)
	   Local cPath, cFile, cHtml := ''
	   cPath := cFilePath(GetModuleFileName(GetInstance()))
   cFile := cPath + "v8.html"
	   fErase(cFile)
	   If nlink = 1
      cHtml := '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" height="100%" width="100%"><param name="wmode" value="transparent"> '+;
               '<param name="flashvars" value="cid=17074538&autoplay=true"><param name="allowfullscreen" value="true"> '+;
               '<param name="allowscriptaccess" value="always"><param name="src" value="http://www.ustream.tv/flash/viewer.swf"> '+;
               '<embed flashvars="cid=17074538&autoplay=true" allowfullscreen="true" allowscriptaccess="always" src="http://www.ustream.tv/flash/viewer.swf" type="application/x-shockwave-flash" height="100%" width="100%"></object>'
   Elseif nLink = 2
      cHtml := '<iframe width="100%" height="100%" src="https://www.youtube.com/embed/LcEE8gML8Lg?autoplay=1"></iframe>'
   ElseIf nLink = 3
      cHtml := '<iframe width="100%" height="100%" src="https://www.youtube.com/embed/lLuc6rtWkrM?autoplay=1"></iframe>'
   ElseIf nLink = 4
      cHtml := '<iframe allowfullscreen="true" msallowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" width="100%" height="100%" frameborder="0" src="http://fast.player.liquidplatform.com/pApiv2/embed/7a683b067e5eee5c8d45e1e1883f69b9?title=tvdiario&autoStart=true&enableShare=false&gaAccount=UA-24105952-6&alternateLive=http://slrp.sambavideos.sambatech.com/liveevent/tvdiario_7a683b067e5eee5c8d45e1e1883f69b9/livestream/playlist.m3u8" ></iframe>'
   ElseIf nLink = 5
      cHtml := '<H2>Escuta Aérea GALEÃO Rio'
      cHtml += '<iframe width="100%" height="100%" frameborder="0" src="http://radio.server6.com.br:8282/stream"></iframe>'
   Else
      cHtml += '<iframe width="100%" height="100%" src="http://www.ustream.tv/embed/9408562?html5ui&autoplay=true" scrolling="no" allowfullscreen webkitallowfullscreen frameborder="0" style="border: 0 none transparent;"></iframe>'
   Endif
	   MemoWrit(cFile, cHtml)
	Return cFile
//------------------------------------------------------------------------------------
Function INTER_APP_WEB_CONFIG(nVersionIE)
	   Local oReg, oRegKey, cRegProgGet, lDeleteKey := .f., cNameProg, uIEver
	   oReg := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Internet Explorer\" )
	   uIEver := oReg:Get( "svcVersion" )
	   DEFAULT nVersionIE := If(Left(Alltrim(uIEver),2)="11", 11001, )
   DEFAULT cNameProg  := Alltrim(cFileName(HB_ARGV(0)))
	   If IsWow64()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION" )
      oRegKey:Set(cNameProg, nVersionIE,4)
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_AJAX_CONNECTIONEVENTS" )
      oRegKey:Set(cNameProg,0,4)  // Padrão 0
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_ZONE_ELEVATION" )
      oRegKey:Set(cNameProg,0,4)  // Padrão 1
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_READ_ZONE_STRINGS_FROM_REGISTRY" )
      oRegKey:Set(cNameProg,1,4)  // Padrão 0
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BEHAVIORS" )
      oRegKey:Set(cNameProg,1,4)
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_ENABLE_WEB_CONTROL_VISUALS" )
      oRegKey:Set(cNameProg,1,4)
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_SHOW_APP_PROTOCOL_WARN_DIALOG" )
      oRegKey:Set(cNameProg,1,4) // Padrao 0
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_GPU_RENDERING" )
      oRegKey:Set(cNameProg,1,4) // Padrao 0
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_NINPUT_LEGACYMODE" )
      oRegKey:Set(cNameProg,0,4) // Padrao 1
      oRegKey:Close()
   Else
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION" )
      oRegKey:Set(cNameProg, nVersionIE,4)
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BEHAVIORS" )
      cRegProgGet := oRegKey:GetBinary(cNameProg)
      If Empty(cRegProgGet)
         oRegKey:Set(cNameProg,1,4)
      EndIf
      oRegKey:Close()
      oRegKey := TReg32():New( HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_ENABLE_WEB_CONTROL_VISUALS" )
      oRegKey:Set(cNameProg,1,4)
      oRegKey:Close()
   EndIf
	Return nil


 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...