gpt4 book ai didi

html - 如何将视频文件包含到 CHM 文件中?

转载 作者:行者123 更新时间:2023-12-04 07:43:44 27 4
gpt4 key购买 nike

我有 CHM文件与 SWF里面的视频。
enter image description here
我想用 MP4 转换它并创建新 CHM文件。
转换,正常工作。但是我找不到任何包含视频文件的程序 CHM像原来一样。我试过例如 HTML Help Workshop .它创建了一个小CHM并在其旁边保留视频文件。
enter image description here
另一个程序htm2crm做一个大文件(右)。但是文件内部的路径不正确(左)。
enter image description here
你知道怎么创建CHM带有内部视频的文件?为了有一个大文件。

最佳答案

简短的回答是 - 我不知道今天有任何与集成 .mp4 视频一起使用的应用程序。
经过几次当前的尝试,我只能确认statement已经由 Tim Green 在 2014 年制作的:

.. CHM now only permits embedding of SWF video files. All other video file formats must be external to the CHM, otherwise they won't play.


请注意以下引自 About using video files 的提示

Use online video services in CHM. Help+Manual handles this so that the online site is only accessed when the user actually clicks on the preview image to start the video.


Local video formats will always cause problems in CHM files for at least some of your users and should be avoided.


Since the termination of Flash support, Microsoft CHM files no longer support embedding for any video formats. MP4 video files can be embedded in Windows eWriter eBooks. All other video files must be distributed with your help as separate files.


更多信息的链接:
  • Running Applets/Media Player etc in a HH Window

  • 对于特殊情况,我记得一些旧的东西,将视频文件留在帮助文件之外,并使用脚本来引用它们。在您的帮助项目中包含大型视频文件可能会产生巨大的编译帮助文件。有时您也可能需要更新这些文件。
    <html>
    <head>
    <title>Example link to video</title>
    <script type="text/javascript">
    <!--

    function GetCurrDir() {

    // This function gets the absolute path to the directory that contains the help file.

    var X, Y, sl, a, ra, dir, dir2;

    ra = /::/;
    a = location.href.search(ra);
    if (a <= 0) return("");
    X = 0;
    ra = /:/;
    a = location.href.search(ra);
    if (a == 2) X = 14; else if (a > 2) X = a+1;
    sl = "\\";
    Y = location.href.lastIndexOf(sl);
    dir = location.href.substring(X, Y);
    dir2 = unescape(dir);
    return(dir2 + "\\");
    }


    function playVideo(theVideo) {
    // Get the absolute path to the current help directory.

    var path = GetCurrDir();
    // Make a new Media Player control.
    var control = "<object id='mediaPlayer' " +
    "classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' " +
    "type='application/x-oleobject'>" +
    "<param name='fileName' value='"+ path + theVideo + "'>" +
    "<param name='autoStart' value='true'>" +
    "<param name='showControls' value='true'>" +
    "</object>" +
    "<p><a href='JavaScript:history.back()'>Go back</a></p>";

    // Add the new control to the page.
    document.write(control);

    }

    //-->
    </script>
    </head>
    <body>
    <h1>Test case for video</h1>
    <h2>Video 1</h2>
    <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr.</p>
    <!-- Clicking this image passes the name of the required video file to the playVideo function above. -->
    <a href="JavaScript:playVideo('external-files/HTMLHelp-CHM.mp4')"><img src="../images/extlink.gif" /></a>
    </body>
    </html>
    Microsoft Docs Example: Link to a File Outside of Your Help System解释这些线路在做什么。

    关于html - 如何将视频文件包含到 CHM 文件中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67308873/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com