html Azure Media Player启用搜索器和其他控件

egmofgnx  于 2022-12-16  发布在  其他
关注(0)|答案(1)|浏览(130)

我正在尝试使用HTML/JS代码段将Azure Media Player集成到项目中。但我无法启用后退和前进按钮。甚至箭头键也不起作用。我还想启用更多功能,如字幕等。任何代码段或文档都将非常有帮助。
目前,我正在参考下面的https://amp.azure.net/libs/amp/latest/docs/index.html来取得突破。
谢谢
下面是代码片段'

<video id="azuremediaplayer" class="azuremediaplayer amp-default-skin amp-big-play-centered"> </video>
    <script>
        var myOptions = {
            autoplay: true,
            controls: true,
            width: "640",
            height: "400",
            poster: "",
            cea708CaptionsSettings: {
                enabled: true,
                srclang: 'en',
                label: 'Live CC'
            },
            playbackSpeed: {
                enabled: true,
                initialSpeed: 1.0,
                speedLevels: [
                    { name: "x4.0", value: 4.0 },
                    { name: "x3.0", value: 3.0 },
                    { name: "x2.0", value: 2.0 },
                    { name: "x1.75", value: 1.75 },
                    { name: "x1.5", value: 1.5 },
                    { name: "x1.25", value: 1.25 },
                    { name: "normal", value: 1.0 },
                    { name: "x0.75", value: 0.75 },
                    { name: "x0.5", value: 0.5 },
                ]
            },
            plugins: {
                hotkeys: {
                    //optional settings
                    "volumeStep": 0.1,
                    "seekStep": 2,
                    "enableMute": true,
                    "enableFullscreen": true,
                    "enableNumbers": true,
                    "enableJogStyle": true
                }
            }
        };
        var myPlayer = amp("azuremediaplayer", myOptions);
       
        myPlayer.src([{ src: "https://resources.blob.core.windows.net/staging/videos/test.mp4",  type: "video/mp4" }, ]);

    </script>

'

相关问题