Can't fullscreen html5 videos in chrome's webview

前端 未结 2 1535
梦如初夏
梦如初夏 2020-12-22 08:55

I\'ve been searching around for this answer for a while but I\'m not really getting anywhere. My question is regarding a webview inside of a chrome application on a computer

2条回答
  •  不知归路
    2020-12-22 09:44

    It supports html5 fullscreen from version 43, you can use fullscreen permission API: See event-permissionrequest and FullscreenPermissionRequest. Basically, you have to "allow()" the permission, sth like:

    webview.addEventListener('permissionrequest', function(e) {
      if (e.permission === 'fullscreen') {
        e.request.allow();
      }
    });

提交回复
热议问题