Scirra / Construct-bugs

Public bug report submissions for Construct 3 and Construct Animate. Please read the guidelines then click the 'Issues' tab to get started.
https://www.construct.net
107 stars 83 forks source link

[C3 runtime] Sounds that are playing don't mute when pressing the home button while playing an Instant Game in Facebook Messenger (iOS) #2404

Closed RichardAstrom closed 5 years ago

RichardAstrom commented 5 years ago

Problem description

When you press the Home Button on your device (we have tested on an iPhone 6 with iOS 12.1) while playing an Instant Game in Facebook Messenger on iOS that has been exported with the Instant Games Plugin and the C3 runtime, any sound that is already playing continues to play.

Attach a .c3p

instant_games_audio_test_ios.zip

Steps to reproduce

  1. Export the test as HTML5.
  2. Upload it to Instant Games Web Hosting.
  3. Start the test in Facebook Messenger for iOS.
  4. Make sure the music is playing (if not press the screen).
  5. Press the Home Button.

Observed result

The music keeps on playing.

Expected result

The music should be muted/silent. It works if you export with the C2 runtime instead.

First affected release

Construct 3 - r128

Affected browsers/platforms

System details

View details Platform information Browser: Chrome Browser version: 70.0.3538.110 Browser engine: Blink Browser architecture: 64-bit Context: webapp Operating system: Windows Operating system version: 10 Operating system architecture: 64-bit Device type: desktop Device pixel ratio: 1 Logical CPU cores: 4 Approx. device memory: 8 GB User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36 C3 release: r128 (beta) Language setting: en-US Local storage Storage quota (approx): 14 gb Storage usage (approx): 188 mb (1.3%) Persistant storage: Yes Browser support notes This list contains missing features that are not required, but could improve performance or user experience if supported. Nothing is missing. Everything is OK! WebGL information Version string: WebGL 2.0 (OpenGL ES 3.0 Chromium) Numeric version: 2 Supports NPOT textures: yes Supports GPU profiling: yes Supports highp precision: yes Vendor: Google Inc. Renderer: ANGLE (AMD Radeon HD 7800 Series Direct3D11 vs_5_0 ps_5_0) Major performance caveat: no Maximum texture size: 16384 Point size range: 1 to 1024 Extensions: EXT_color_buffer_float EXT_disjoint_timer_query_webgl2 EXT_texture_filter_anisotropic OES_texture_float_linear WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context Audio information System sample rate: 48000 Hz Output channels: 2 Output interpretation: speakers Supported decode formats: Ogg Opus (audio/ogg; codecs=opus) WebM Opus (audio/webm; codecs=opus) Ogg Vorbis (audio/ogg; codecs=vorbis) WebM Vorbis (audio/webm; codecs=vorbis) MPEG-4 AAC (audio/mp4; codecs=mp4a.40.5) MP3 (audio/mpeg) FLAC (audio/flac) PCM WAV (audio/wav; codecs=1) Supported encode formats: WebM Opus (audio/webm; codecs=opus) Video information Supported decode formats: WebM VP9 (video/webm; codecs=vp9) WebM VP8 (video/webm; codecs=vp8) Ogg Theora (video/ogg; codecs=theora) H.264 (video/mp4; codecs=avc1.42E01E) Supported encode formats: WebM VP9 (video/webm; codecs=vp9) WebM VP8 (video/webm; codecs=vp8)
AshleyScirra commented 5 years ago

This is highly likely the same problem as #2403: sounds are muted when the page is suspended, but if it's only firing resume events and not pause events then sounds won't be muted.