我正在学习如何使用jPlayer.我想使用jPlayer 流式传输http://u10.sky.fm:80/sky_the80s音频.
http://www.jplayer.org/1.2.0/demo-08-oggSupportFalse/演示适用于Chrome 9.我尝试使用以下代码片段简化它:
$(document).ready(function() {
$("#jpId").jPlayer( {
ready: function () {
$(this).jPlayer("setFile", "http://mp3-vr-128.as34763.net:80/;stream/1", "http://ogg2.as34763.net/vr160.ogg")
.jPlayer("play");
},
swfPath: "client/js",
volume: 60,
oggSupport: true
});
});
Run Code Online (Sandbox Code Playgroud)
不幸的是,上述方法无效.我确信我失去了一些东西,因为我是jPlayer的新手.
任何帮助表示赞赏.在此先感谢您的帮助.
再次,理想情况下我想流http://u10.sky.fm:80/sky_the80s.
昨晚在https://groups.google.com/forum/?fromgroups#!topic/jplayer/yW7WoYtrxI8上发布.
更新:以下代码片段工作
$(document).ready(function() {
$("#jpId").jPlayer( {
ready: function () {
$(this).jPlayer("setMedia", {
m4a: "http://mp3-vr-128.as34763.net:80/;stream/1",
oga: "http://ogg2.as34763.net/vr160.ogg"
}).jPlayer("play");
debug($(this));
},
supplied: "m4a, oga",
swfPath: "client/js"
});
});
Run Code Online (Sandbox Code Playgroud)
但我仍然无法制作http://u10.sky.fm:80/sky_the80s的作品.
更新2:下面的代码片段在Firefox雷区工作,但并没有在Chrome 9的工作:
$(document).ready(function() {
$("#jpId").jPlayer( {
ready: function () { …
Run Code Online (Sandbox Code Playgroud) 我正在查看来自http://www.javascriptkit.com/javatutors/oopjs.shtml的示例
var person = new Object()
person.name = "Tim Scarfe"
person.height = "6Ft"
Run Code Online (Sandbox Code Playgroud)
但是没有提到如何"释放"它以避免内存泄漏.
以下代码会免费吗?
person = null;
Run Code Online (Sandbox Code Playgroud)
在此先感谢您的帮助.
我有以下代码片段
$(document).mousedown(function(event) {
doSomething();
}
Run Code Online (Sandbox Code Playgroud)
我可以mousedown
成功捕获事件.
我正在尝试执行以下操作:
mousedown
事件我有以下JSON代码段:
{ "randomlygeneratedKeyname0" : "some-value",
"randomlygeneratedKeyname1": {
"randomlygeneratedKeyname2" : {
"randomlygeneratedKeyname3": "some-value",
"randomlygeneratedKeyname4": "some-value"
},
"randomlygeneratedKeyname5": {
"randomlygeneratedKeyname6": "some-value",
"randomlygeneratedKeyname7": "some-value"
}
}
}
Run Code Online (Sandbox Code Playgroud)
请注意,我不知道它们的名称randomlygeneratedKeyname
和它们的命名约定是不一致的,因此我无法创建相应的Java字段/变量名称.
我如何(在)GSON中序列化它?
在此先感谢您的帮助.
我有以下HTML代码段
<body onload="main()" >
...
<canvas id="myId" class="myClass"></canvas>
...
</body>
Run Code Online (Sandbox Code Playgroud)
它按预期工作.我可以正确显示输出.
然后我删除
<canvas id="myId" class="myClass"></canvas>
Run Code Online (Sandbox Code Playgroud)
因为我想使用以下JavaScript代码段以编程方式创建它
var canvas = document.createElement("canvas");
canvas.className = "myClass";
canvas.id = "myId";
Run Code Online (Sandbox Code Playgroud)
不幸的是,它没有用.我不能用这个来展示任何东西.
我想知道我是否想念一些东西.任何帮助表示赞赏.在此先感谢您的帮助.
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.160s
[INFO] Finished at: Sat Dec 10 16:27:55 ICT 2011
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (
D:\experiment\maven). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full …
Run Code Online (Sandbox Code Playgroud) 我正在看以下代码中的iPhone aurioTouch示例:
static OSStatus PerformThru(
void *inRefCon,
AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
AudioBufferList *ioData)
{
aurioTouchAppDelegate *THIS = (aurioTouchAppDelegate *)inRefCon;
OSStatus err = AudioUnitRender(THIS->rioUnit, ioActionFlags, inTimeStamp, 1, inNumberFrames, ioData);
if (err) { printf("PerformThru: error %d\n", (int)err); return err; }
// Remove DC component
for(UInt32 i = 0; i < ioData->mNumberBuffers; ++i)
THIS->dcFilter[i].InplaceFilter((SInt32*)(ioData->mBuffers[i].mData), inNumberFrames, 1);
// ...
}
Run Code Online (Sandbox Code Playgroud)
在文件aurioTouchAppDelegate.mm中.
初学者问题:"删除DC组件"有什么作用?任何指向教程文章的指针都很受欢迎.
在此先感谢您的帮助.
https://forums.aws.amazon.com/thread.jspa?threadID=52853提到"保存并共享"功能.
但我无法在http://calculator.s3.amazonaws.com/calc5.html上找到如何"保存并分享"
任何帮助表示赞赏.
在此先感谢您的帮助.
我正在查看http://www.swiftless.com/tutorials/glsl/3_glcolor.html,其中包含以下代码段:
void main() {
// Set the output color of our current pixel
gl_FragColor = gl_Color;}
Run Code Online (Sandbox Code Playgroud)
我试图在我的WebGL上使用gl_Color.我得到一个错误,gl_Color是未声明的标识符.
我做错了什么?
在此先感谢您的帮助.
我在WebGL上有以下代码片段:
var texture = gl.createTexture();
texture.image = new Image();
texture.image.onload = function() {
.... // I want to read the pixels once the image has been loaded
};
texture.image.src = urlImage;
Run Code Online (Sandbox Code Playgroud)
我想在加载后获得纹理贴图的内容(RGBA).类似,readPixels()获取绘图缓冲区内容的能力.
可能吗?如果是这样,最好的做法是什么?
我正在使用Chrome Canary build进行开发.
在此先感谢您的帮助.
注:http ://www.khronos.org/message_boards/viewtopic.php?f = 43&t=3439上的交叉发布
如何在kAudioUnitSubType_RemoteIO上专门设置音频单元的音量?
我看到kAudioUnitSubType_MultiChannelMixer的东西
status = AudioUnitSetParameter(mixerUnit, kMultiChannelMixerParam_Volume, kAudioUnitScope_Output, AU_OUTPUT_BUS, volume, 0);
Run Code Online (Sandbox Code Playgroud)
在此先感谢您的帮助
我正在学习在WebGL上使用multitexture.我有以下着色器代码片段:
uniform int flag;
uniform sampler2D texture0;
uniform sampler2D texture1;
varying vec2 v_texCoord;
void main()
{
vec2 texCoord = vec2(v_texCoord.s, 1.0 - v_texCoord.t);
vec4 texel0 = texture2D(texture0, texCoord);
vec4 texel1 = texture2D(texture1, texCoord);
if (1 == flag)
{
gl_FragColor = texel1;
} else
{
gl_FragColor = texel0;
}
}
Run Code Online (Sandbox Code Playgroud)
另外,我的JavaScript代码片段:
gl.uniform1i(gl.getUniformLocation(gl.program, "flag"), 1);
gl.uniform1i(gl.getUniformLocation(gl.program, "texture0"), 0); // Texture Unit 0
gl.uniform1i(gl.getUniformLocation(gl.program, "texture1"), 1); // Texture Unit 1
// Activate 2 textures
gl.enable(gl.TEXTURE_2D);
gl.activeTexture(gl.GL_TEXTURE0);
gl.bindTexture(gl.TEXTURE_2D, photoTexture0);
gl.activeTexture(gl.GL_TEXTURE1);
gl.bindTexture(gl.TEXTURE_2D, photoTexture1);
Run Code Online (Sandbox Code Playgroud)
photoTexture1(texture1)仅在屏幕上显示黑色.我可以正确显示photoTexture0(texture0).似乎在着色器中看不到photoTexture1(texture1).
由于上面的代码不起作用,我是新手,我想知道我做错了什么和/或我误解了多纹理的工作原理. …
我有以下html代码段:
<div id="contentX"><h1>MyHeading1</h1></div>
Run Code Online (Sandbox Code Playgroud)
我可以通过以下方式成功选择jQuery代码段:
console.log($('#contentX h1'));
Run Code Online (Sandbox Code Playgroud)
输出是
[<h1>?MyHeading1?</h1>?]
Run Code Online (Sandbox Code Playgroud)
然而,它并没有当我动态加载的内容合作.例如,
html代码段:
<div id="content"></div>
Run Code Online (Sandbox Code Playgroud)
jQuery代码片段:
$('#content').load('foo.html')); // the content is loaded correctly with <h1> tag
Run Code Online (Sandbox Code Playgroud)
jQuery的代码片段并没有工作:
console.log($('#content h1')); // it returns []. I was expecting to return something.
Run Code Online (Sandbox Code Playgroud)
我想知道这是否是类似于事件绑定的行为:.click()vs .live().
在此先感谢您的帮助.
webgl ×3
audio ×2
iphone ×2
javascript ×2
jquery ×2
canvas ×1
core-audio ×1
gson ×1
html5 ×1
java ×1
jplayer ×1
json ×1
maven ×1
opengl-es ×1
powershell ×1