CObject调用VLC ocx控件播放mp4视频,也可以播放流 VFB

yjgyjgg 2021-7-15 8678

    dim ocx as CObject
    ocx.CreateObjectFromLib("axvlc.dll" ,"{9BE31822-FDAD-461B-AD51-BE1D1C159921}")创建VLC对象
    if ocx.IsErr Then Exit sub
    ocx.AttachControl Me.Custom1.hWnd'附加到任意窗口上
    Ocx.Put("AutoPlay" ,vbTrue)'设置自动播放为True
    if Ocx.IsErr Then Debug.Print Ocx.ErrDescription'查询是否有错误
    dim o as CObject = Ocx.get("playlist")'获得播放列表对象
    If Ocx.IsErr Then Debug.Print Ocx.ErrDescription
    o.Run("Add" ,"file:///" & App.Path &"\1600746019592311.mp4")'添加mp4文件到播放列表
    If o.IsErr Then Debug.Print o.ErrDescription
    o.Run("play")'播放

因国家互联网安全管理要求,关闭回帖功能。大家需要留言,请使用【勇芳软件客服】即时联系勇芳点此打开->>勇芳软件客服
返回
联系勇芳
发新帖 搜索 反馈 回顶部