语言

Menu
Sites
Language
AudioContext.prototype.suspend and Gear S2 S3

 How I can check in the browser console on the device   ( Or first  for Emulator GearS2) if AudioContext.prototype.suspend is available?

 

 

查看选择的答案

响应

1 回复
Mark as answer
Safwan

Hello, If the web browser/application supports AudioContext.prototype.suspend then, in console.log or alert it will output a 'function body' or some 'object value'. If AudioContext.prototype.suspend is not supported on the web application or browser it will output 'Can't find' or 'not defined' or 'undefined'.

I ran a test on both 'Mozilla Firefox web browser' and Gear s2. 

 

On Firefox web browser:

Firefox browser > Open Menu > Developer > Web Console >
alert (AudioContext.prototype.suspend); 

Outputs a function body. Screenshot:

So yes, it supports AudioContext.prototype.suspend.

 

 

And on Tizen Studio in js file I applied:

alert(AudioContext.prototype.suspend);
console.log(AudioContext.prototype.suspend);
Debug As > Tizen Web Application 

But the output was:

Can't find Variable AudioContext

Screenshot of console:

So, I guess AudioContext.prototype.suspend is supported for browser / browser games but not for Web application on Gear S2.