首页 文章

单击Android应用程序时未触发Azure媒体播放器播放/暂停事件(“技术点击”)

提问于
浏览
1

在Android手机上,单击视频帧后,Azure媒体播放器不会引发"tech-click"事件 . 1)使用http://amp.azure.net/libs/amp/latest/azuremediaplayer.min.js使用如下选项创建azuremediaplayer,

var myOptions = {techOrder:["azureHtml5JS","flashSS","html5FairPlayHLS","silverlightSS","html5"],
autoplay:true,"nativeControlsForTouch":false控件:true,
};

2)注册事件myPlayer.addEventListener(“”tech-click“”,_ ampEventHandler);

3)单击_ampEventhandler不会被触发 .

1 回答

  • 0

    点击事件适用于浏览器,移动设备适用于触摸事件 .

    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;
    
            });
    

相关问题