Phaser on iOS (sometimes) stay paused
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript
- Lĩnh vực
- game-dev, mobile-dev
Hướng nghiên cứu
Start by comparing the iOS pause and resume handling with the related issue #663 and the Phaser version discussed in #665; the payload does not name source files or tests. Reproduce the tab-switch behavior on iOS 12.4.6 using the linked video, then trace why resume is not called. Done means the game reliably resumes after returning to its browser tab without the reported manual touch listener.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
This issue may be similar to https://github.com/photonstorm/phaser-ce/issues/663.
Problem is, that when you click icon for browsing tabs (top right corner - see image below) and immediately click on tab with game, then game stays paused=true and looks like frozen. All buttons work, but game stays paused. It looks like resume is not called.

It does not happen always. Usually, it happens when you just opend browser and loaded game. I shot video of what happens and it is in .zip below (my iOS version is 12.4.6, I also tried Phaser engine version you attached to case https://github.com/photonstorm/phaser-ce/issues/665, but without success):
paused.zip
As a fix I subscribed to onPause signal in Boot state:
game.onPause.add(this.onPauseHandler, this);
onPauseHandler() looks like this:
onPauseHandler: function() {
if (game.device.iOS) {
this.addMyCanvasListener();
}
},
and finally addMyCanvasListener() like this:
addMyCanvasListener: function() {
var can = document.getElementById('game-container');
can.addEventListener('touchstart', function _listener() {
game.paused = false;
can.removeEventListener('touchstart', _listener, false);
}, false);
},
With this setup I can unpause game if it is still paused after selecting tab.
- Ngôn ngữ chính
- JavaScript
- Star
- 1.4k
- Fork
- 485
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của phaserjs/phaser-ce
-
Web audio stops playing in iOS 17 and 18 after refocusingCó thể làm lại được @samme đã nhận 633 ngày trước và không có pull request nào đang mở. Đang mở
phaserjs/phaser-ce#748 · 2 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
phaserjs/phaser-ce#740 · 9 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
phaserjs/phaser-ce#724 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
phaserjs/phaser-ce#711 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của phaserjs/phaser-ce
Issue tương tự
-
enhancement ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
DCGM/semant-demo#708 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Client codegen: an import repeated in an impl file is emitted twice, and the browser rejects the moduleCó thể đã có người làm @MalithaPrabhashana đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
jaseci-labs/jac#10756 ·
Maintainer thường phản hồi trong vòng 1 ngày