【问题标题】:Azure media player play/pause event("tech-click") not triggered on click Android appAzure 媒体播放器播放/暂停事件(“技术点击”)未在点击 Android 应用时触发
【发布时间】:2017-09-04 12:02:36
【问题描述】:

在 Android 手机上,Azure 媒体播放器在点击视频帧后不会引发“技术点击”事件。 1) 使用http://amp.azure.net/libs/amp/latest/azuremediaplayer.min.js 创建了 azuremediaplayer 使用如下选项,

var myOptions = { techOrder: ["azureHtml5JS", "flashSS", "html5FairPlayHLS", "silverlightSS", "html5"],
自动播放:是的, “nativeControlsForTouch”:假 控制:真,
};

2) 注册事件 myPlayer.addEventListener(""tech-click"", _ampEventHandler);

3) 单击时不会触发 _ampEventhandler。

【问题讨论】:

  • 即使在浏览器上也面临这个问题。 myPlayer.addEventListener(amp.eventName.click, _ampEventHandler);即使在浏览器上也不起作用。另一个点击事件播放,暂停有效

标签: android azure-media-services


【解决方案1】:

点击事件是针对浏览器的,对于移动设备来说是触摸事件。

        var touchmoved;

        myPlayer.addEventListener("touchend", function () {

            if(touchmoved != true){
                // click action
                console.log('clicked');
                //Here the play/pause action can be triggered

            }


        }).addEventListener("touchmove", function () {
            Log('touchmove');
            touchmoved = true;

        }).addEventListener("touchstart", function () {
            Log('touchstart');
            touchmoved = false;

        });

【讨论】:

    猜你喜欢
    • 2016-08-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-28
    相关资源
    最近更新 更多