WMP_Objekt

  • Wie kann ich bei einem WMP-Objekt ein Video abspielen?

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 629, 442, 186, 125)
    $Obj1 = ObjCreate("WMPlayer.OCX.7")
    $Obj1_ctrl = GUICtrlCreateObj($Obj1, 0, 0, 628, 440)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

    EndSwitch
    WEnd

    [/autoit]

    mfg. Jam00

  • bemühe mal die suche, da gibt es Beispiele wie man ein Item der playlist geben kann oder einfach mit open

    [autoit]

    $oMedia = $Player.newMedia("C:\\blabla\video.avi")
    $Obj1.currentPlaylist.appendItem($oMedia)
    $Obj1.controls.play()

    [/autoit]
  • Okay, hab ich hab auch gefunden, aber warum Spielt er nur den Ton?

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 629, 442, 186, 125)
    $Player = ObjCreate("WMPlayer.OCX")
    $Obj1_ctrl = GUICtrlCreateObj($Player, 10, 10, 400, 200)
    $oMedia = $Player.newMedia('http://wstreaming.zdf.de/encoder/livestream6_h.asx')
    $Player.currentPlaylist.appendItem($oMedia)
    $Player.controls.play()
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

    EndSwitch
    WEnd

    [/autoit]

    mfg. Jam00

  • Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 629, 442, 186, 125)
    $Player = ObjCreate("WMPlayer.OCX")
    $Obj1_ctrl = GUICtrlCreateObj($Player, 10, 10, 400, 200)

    [/autoit] [autoit][/autoit] [autoit]

    With $Player
    .fullScreen = True
    .windowlessVideo = True
    .stretchToFit = True
    .enableContextMenu = True
    .enabled = True
    .uiMode = "full"; none / mini full
    .settings.autostart = True
    .settings.mute = False
    .settings.volume = 100; 0 - 100
    .settings.Balance = 0; -100 to 100
    EndWith

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $oMedia = $Player.newMedia('http://wstreaming.zdf.de/encoder/livestream6_h.asx')
    $Player.currentPlaylist.appendItem($oMedia)
    $Player.controls.play()
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

    EndSwitch
    WEnd

    [/autoit]
  • und zwar wenn man den stream in zeile 49 orginal reinmacht von anfang an geht es aber wie kann man den stream aus der ini anlaufen lassen

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    #include <TreeViewConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #Include <GuiTreeView.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <GuiListView.au3>
    #include <ListViewConstants.au3>
    #include <StructureConstants.au3>
    #include <String.au3>
    #include <array.au3>
    #include <Guiconstants.au3>
    #include <Sound.au3>
    #include <File.au3>
    #include <GuiTab.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <TreeViewConstants.au3>
    #include <WindowsConstants.au3>
    #include <GuiTreeView.au3>
    $Old = ""
    #Region ### START Koda GUI section ### Form=
    $hgui = GUICreate("Form1", 629, 442, 186, 125)
    $Player = ObjCreate("WMPlayer.OCX")
    $Obj1_ctrl = GUICtrlCreateObj($Player, 0, 0, 629, 442)
    $TreeView1 = GUICtrlCreateTreeView(435, 0, 190, 396)
    $Combo1 = GUICtrlCreateCombo("Land Wählen", 24, 400, 145, 25)
    GUICtrlSetData(-1,"Ägypten|Äthiopien|Afghanistan|Albanien|Algerien|Andorra|Angola|Antigua|Barbedos|Argentinien|Armenien|Aserbaidschan|Australien|Bahrain|Bangladesch|Belgien|Belize|Benin|Bolivien|Bosnien_Herzegow|Brasilien |Brunei|Bulgarien|Chile|China|Costa_Rica|Dänemark|Deutschland|Dominikanische_R|Ecuador||El Salvador|Elfenbeinküste|Estland|Färoeer|Fidschi|Finnland|Fr.Guyana|Fr.Polynesien|Frankreich|Georgien|Grönland|Griechenland|Guatemala|Haiti|Honduras|Hong Kong|Indien|Indonesien|Irak|Iran|Irland|Island|Israel|Italien|Jordanien|Kamerun|Kanada|Kasachstan")
    With $Player
    .fullScreen = True
    .windowlessVideo = True
    .stretchToFit = True
    .enableContextMenu = True
    .enabled = True
    .uiMode = "full"; none / mini full
    .settings.autostart = True
    .settings.mute = True
    .settings.volume = 100; 0 - 100
    .settings.Balance = 0; -100 to 100
    EndWith
    $oMedia = $Player.newMedia("")
    $Player.currentPlaylist.appendItem($oMedia)
    $Player.controls.play()
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    Global $ReadOld = ""
    While 1
    $nMsg = GUIGetMsg(1)
    Switch $nMsg[1]
    Case $hgui
    $Read3 = GUICtrlRead ($Combo1)
    If $Read3 <> $ReadOld Then
    _GUICtrlTreeView_DeleteAll($TreeView1)
    _Sender(@ScriptDir & "\data\Sender.ini",$Read3,$TreeView1)
    $ReadOld = $Read3
    EndIf
    $Text = _GUICtrlTreeView_GetText ($TreeView1,_GUICtrlTreeView_GetSelection($TreeView1))
    If $Text <> $Old Then
    $Url = _URL(@ScriptDir & "\data\Sender.ini",$Read3,$TreeView1)
    $Player.newMedia ($Url)
    $Old = $Text
    EndIf

    Switch $nMsg[0]
    Case $GUI_EVENT_CLOSE
    exit
    EndSwitch
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    func _Sender ($File,$Section,$hWnd)
    Local $Read,$Sender
    $Read = IniReadSection ($File,$Section)
    If Not @error Then
    For $A = 1 To $Read[0][0]
    _GUICtrlTreeView_Add ($hWnd,"",$Read[$A][0])
    Next
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _URL($File,$Section,$hWnd)
    Local $Read,$Text,$Read2
    $Read = IniReadSection ($File,$Section)
    $Text = _GUICtrlTreeView_GetText ($hWnd,_GUICtrlTreeView_GetSelection($hWnd))
    $Read2 = IniRead ($File,$Section,$Text,"")
    Return $Read2
    EndFunc

    [/autoit]