我一直试图找到一个解决方案(遗憾的是现在3个月)使用iOS上的Meteors Accounts Facebook登录Facebook.我已经尝试了谷歌搜索将提出的所有内容,在Meteor论坛上进行了解决,甚至打开了Github问题.
但这个问题仍然逃脱了我.一切都在桌面上工作正常,但是当我在手机上测试时,我收到Facebook错误 "未登录.您尚未登录.请登录并重试".
我已经找到了其他几个有这个问题的人,并且在完整的证据答案上输入很少.在这一点上,我开始变得绝望.
直到Meteor升至1.3之后,这才成为问题.
我正在尝试使用 howler.js生成波形(https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Visualizations_with_Web_Audio_API)。我看到 dataArray 在 draw 函数中循环。然而,它只绘制一条直线,因为 v 变量总是返回 1。我基于一个非常常见的 MDN 示例编写代码,这让我相信我获取咆哮数据的方式可能不正确。
HTML
<div id="play">play</div>
<canvas id="canvas"></canvas>
Run Code Online (Sandbox Code Playgroud)
JS
let playing = false
const playBtn = document.getElementById('play')
const canvas = document.getElementById('canvas')
const canvasCtx = canvas.getContext('2d')
const WIDTH = canvas.width
const HEIGHT = canvas.height
let drawVisual = null
/*
files
https://s3-us-west-2.amazonaws.com/s.cdpn.io/481938/Find_My_Way_Home.mp3
*/
/*
streams
'http://rfcmedia.streamguys1.com/MusicPulse.mp3'
*/
let analyser = null
let bufferLength = null
let dataArray = null
const howler = new Howl({
html5: true,
format: ['mp3', 'aac'],
src:
'https://s3-us-west-2.amazonaws.com/s.cdpn.io/481938/Find_My_Way_Home.mp3',
onplay: …Run Code Online (Sandbox Code Playgroud) 我一直在遇到关于在Polymer 2.0中从父级调用子事件的错误示例或过时的1.0文档.基本上我想要完成的就是从父级触发子事件.但是,当调用"this"时,我似乎也无法在父元素的树结构中找到引用.
的index.html
<!DOCTYPE html>
<html>
<head>
<link rel="import" href="/elements/parent-element.html">
</head>
<body>
<parent-element></parent-element>
<script src="js/polymer.js"></script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
家长element.html
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="./child-element.html">
<dom-module id="parent-element">
<template>
<div>
parent
<child-element></child-element>
</div>
</template>
<script>
class ParentElement extends Polymer.Element {
constructor(){
super()
}
callChildEvent(){
// call event
}
static get is() {
return "parent-element";
}
}
customElements.define(ParentElement.is, ParentElement);
</script>
</dom-module>
Run Code Online (Sandbox Code Playgroud)
儿童element.html
<link rel="import" href="../bower_components/polymer/polymer.html">
<dom-module id="child-element">
<template>
<div on-click="customEvent">
child element
</div>
</template>
<script>
class ChildElement extends Polymer.Element {
constructor(){
super()
} …Run Code Online (Sandbox Code Playgroud)