Streaming Audio Into Hidden Frame W/ Javascript Controls.
Jul 20, 2005I want to stream audio into a hidden frame and load, stop, and control
volume via JavaScript. I'm thinking w/ Windows Media Player.
I want to stream audio into a hidden frame and load, stop, and control
volume via JavaScript. I'm thinking w/ Windows Media Player.
I wanna play streaming audio (an asx.file) trough javascript. I allready found a tutorial on the net. Till so far it works (I can push play, pause and stop), but I want to change the volume to. An example: Code:
Do you know where the problem is? One thing that I must say is that the tutorial (where I took it from) worked with a wav-file, as you can see I work with a streaming file (asx-file).
I need to allow user to download mp3 files when they click on the link rather than streaming the audio in the browser. Need to use only Javascript to download the file.
View 1 Replies View RelatedI'm trying to stop the audio in a hidden div from playing once a user clicks on the next video clip. i know this is a known bug in IE but i can't figure out how to fix this (as i am a total noob). can someone tell me how i can do this? And yes, my client refuses to use firefox and only IE
Here is my current code.
I've a video list and when a user clicks on a video link it should play the video in one area of the page. but when you click on the second and third video links the audio from all videos play at the same time. i know this is a known bug in IE but for the life of me i can't fix it. it works fine for firefox but my client uses IE
How to stop the audio of the previous video when a new video link is clicked on?
<SCRIPT LANGUAGE="JavaScript">
I am working with ASP.net and VB as my code behind. I tried solving this in normal JavaScript with no luck. I have a textbox that when it receives focus I want to make the next 3 controls visible. I have tried the included code with no luck. Here is the Head and Jquery.
[Code]...
I'm creating a simple page that consists of a hidden frame and a main page. The main page gets the javascript functions from the hidden frame. One function displays a scrolling message and the other displays an alert. I'm getting two errors, but they are the same one. "top.HIDDEN is null or not an object" on line 3 & 0 (when I click the link).
Frameset:
<HTML>
<TITLE>Assignment 9.2</TITLE>
<FRAMESET ROWS="0,*", FRAMEBORDER=NO BORDER=0 FRAMESPACING=0>
<FRAME NAME="HIDDEN" SRC="java.htm">
<FRAME NAME="MAIN" SRC="main.htm" MARGINHEIGHT=0 MARGINWIDTH=0>
</FRAMESET>
</HTML>
Main.htm:
<html>
<head><title>Assignment 9.2</title>
</head>
<body onload="Javascript:top.HIDDEN.scrollingMsg()"><center>
<h1>Assignment 9.2<br></h1>
<FORM Name="msgForm">
<INPUT Type="text" Name="scrollingMsg" Size="23">
</FORM><br><br>
<A HREF="Javascript:top.HIDDEN.alertMessage();">click here</A>
</body>
</html>
java.htm:
<HTML>
<script LANGUAGE="Javascript">
<!-- Hide from old browsers
scrolling message function
var scrollMsg = " *Welcome to Assignment 9.2!* "
var msgSpace = "--- ---"
var beginPos = 0
function scrollingMsg() {
document.msgForm.scrollingMsg.value = scrollMsg.substring(beginPos,scrollMsg.length)+msgSpace+scrollMsg.substring(0,beginPos)
beginPos = beginPos + 1
if (beginPos > scrollMsg.length) {
beginPos = 0
}
window.setTimeout("scrollingMsg()",200)
}
function alertMessage() {
alert('You clicked the link!');
}
-->
</SCRIPT>
</HTML>
Does anyone know of a way I can check asp validator controls from the client
side? I need to be able to opt out of a postback if any validators are
false. I am using a ComponentArt tabstrip and it proceeds with posting back
even if "IsValid" is false.
I am a .Net Developer. I want to know to write javascript for serverside controles.And where it is placed for sever sidr controls. Please tell me if any one know this.
View 1 Replies View RelatedI'm working on a little frames based web market research tool (not for public consumption) which allows us select various supplier websites via a link in a header frame, to be loaded in a main frame, from which we may drag data to be dropped into a form in a third form_frame which then submits to our database. All in all, this works nicely until we come to one of the supplier sites which has implemented a frame-killer script.
Now, I know it would be bad form (probably illiegal even) to force a site into the frames of another site for public consumption but I don't think that is an issue here so I ask you all ... Is it possible to disable JavaScript (on the fly) for a given frame only?
I have a top-bottomLeft-bottomRight frameset and three pages (details01.html, details02.html and details03.html):
<frameset rows="80,*" cols="*" frameborder="no" border="0" framespacing="0">
I have two frames. "Top" contains a local file on my server with the aforementioned javascript. "Bottom" is a remote website on a server I do not control. I want to use javascript in "Top" to determine what the current url is in the "bottom" frame...
View 1 Replies View RelatedCan someone show me how I can have:
<a href="javascript:history.back()" name="Back" value="Back"
style=width:40px;float:right;margin-left:0px class="button" >Back</a>
but since this href exists in a frame, it only pertains to this frame?
I have set of frames... one contains a menu and the other a status frame. I am calling a function from the menu which sets the variables however I need some help passing those variables to the status frame. How would I go about doing such a thing?
This is called from the menu in frame 1 but doesn't work:
Code:
function jumpsec(cat, prod) {
parent.statusbar.category=cat;
parent.statusbar.product=prod;
}
// then my status frame bar has:
document.write(parent.statusbar.category);
document.write(parent.statusbar.product);
The 2 variables are blank on statusbar onload but get populated with each click.
I have an outer page and an inner iframe. The outer page calculates some
javascript, and wants the inner frame to run it. The inner frame should hit
a page on the same (private) web server, so this is not a cross-site
scripting attack. But I would prefer not to taint the target page with any
extra logic to do this. (I will if I must.)
The calling page has these elements:
<script src="/javascripts/prototype.js" type="text/javascript" />...
<span id='update_me'>yo2</span>
<iframe id='grinder' src='sample.html' >
</iframe>
So here's most of the page which the iframe hits:
<script src="/javascripts/prototype.js" type="text/javascript" />...
<body bgcolor='silver'>
<span id='update_me'>yo</span>
</body></html>
Note that both the outer and inner page have a span with the same ID.
This question will resemble a JavaScript FAQ - how to evaluate Javascript on
the fly, or how to reload a JS file. The answers on the web generally do not
transport the JS across a frame boundary, so they don't address the bug I
encountered, and I can't tell if prototype.js or IE is at fault.
The outer page calls Ajax goodies that generate some JS looking like this:
Element.update("update_me", "here I B");
The page sends that, as a string, into this JS (in application.js):
function update_grinder(sauce)
{
var grinder = $('grinder');
if (grinder)
{
var doc = grinder.contentDocument;
if (!doc) doc = grinder.document;
if (doc)
{
evaluate(doc, sauce);
return;
}
}
document.write("your browser sucks");
}
So that contains enough logic to find the iframe's document, and it works
for Firefox, IE, Konqueror, and Opera. The code calls evaluate() with the
document where we need the evaluation context, and the string with our
source.
Here's evaluate():
function evaluate(doc, sauce)
{
var s = doc.createElement('script');
//s.defer = true; // <-- no effect
s.text = sauce;
var body = doc.getElementsByTagName('body').item(0);
if (body)
{
body.appendChild(s);
return;
}
body = doc.body;
if (body)
{
body.appendChild(s);
return;
}
}
That creates a <scriptblock, sticks our string in as its contents, and
pushes the block to the end of our <bodytag. Now here's the bug:
Firefox updates the inner <span id='update_me'>, and IE updates the outer
one.
If I remove the outer <span id='update_me'>, then IE simply can't find it
and throws an error. Even though it evaluates a script block clearly in the
context of the inner iframe.
I have tried calling the script from setTimeout, and from a button's onclick
handler.
Is there some script.aculo.us way to fix (yet another) bug in IE? Or is this
a bug in prototype.js?
I have a streaming audio feature set up using a M3u file and a bunch of
MP3's: http://www.motorcityrock.com/mcr_radio/mcr_radio.html. When then
visitor clicks on the link the M3u kicks in and the songs play in the
pre-determined order. That works great, but everytime a visitor clicks the
link the songs start from the beginning. Is there a simple way (using
Javascript or?) to keep the M3u "running" in the background all the time so
that all visitors will hear the same song at the same time...just like a
traditional radio station?
Is it possible to stream XML data from a file using AJAX?
The xml file is constantly being updated by a backend program, I currently have a javascript that has a timer, every second it just runs a loadXML() function to return the XML data however having a few problems with the javascript tripping over itself.
Wondering if AJAX has streaming abilities?
Also, can someone please clarify for me, is the xml dom javascript, or ajax? As I have just read a ajax book that tells you to use xmldom to read xml data but im already doing that, with javascript, what is the difference?
I have just uplaoded my web page and I have having problems playing my files. The entire page works well on the hard drive but dosn't work after I upload it. I assume the problem must be to do with the streaming.
You can view the page to see what I'm trying to do at ....
I am playing with the XMLHTTPRequest method to perform client/server
transactions. I have it set up right now so that when readyState is 4,
it takes the XML and processes it. This works great until there is alot
of data. In that case, the user will have to wait for the data to come
back which may take a minute or so.
I don't want the user to have to wait. Is it possible for javascript to
periodically (while still receiving more data) stop and display what it
has received thus far? I guess this would be considered a type of
streaming.
In mozilla/firefox, I have read that I can use readyState 3 to run my
callback function every 4096 bytes. I can then take those 4K, parse
them, and then continue on. However I have also read that IE cannot do
this. Since I need this to work in IE, is there a workaround?
I wants to access server web page which data is continuously growing(streaming data), I want to buffered some of that data write it in responseText then again get next buffered data write it and so on (in AJAX).
View 3 Replies View RelatedI need to know the min bandwidth for streming picture?
View 1 Replies View Relatedhow can i take javascript array value to hidden box?
View 1 Replies View RelatedI am going to use the server push
for streaming the data by keeping the connection open. At client side,
i am having the XMhttprequest object (i.e ActiveX object of IE). When
the data comes, onreadystatechange method get callback on state 3 but
it doesn't allow me to read the data from the object. It says 'The data
necessary to complete this operation is not yet available'. Is it
possible to read the streaming data from the XMLHttprequest object in
IE?
I know Mozilla supports to read the data, when the ready state is 3. In
Internet Explorer, how we can use the XMLhttp Active object to read the
streaming data.
I try to print out five hidden frames throug a printing-form. I use
the frame.focus() and the frame.print() functions. Everything is fine
except the following little disadvantage:
When I print out the five frames, the print window dialog appears five
time (for each frame once). The user has to confirm his standard
printer several times.
Do anyone know, how I can prevent this?
I'm using input hidden control's value in the javascript function.
same code is working fine on all other browser except a specific
version of safari(i.e.: MAC OS 10.3.7 and Safari 1.2.4).
problem:
control's value is not getting displaying at the first time
when the page gets load, although the same piece of code would work if
I just refresh the page, strage.
declaration of hidden control:
<INPUT id="hSliders" type="hidden" runat="server">
javascript code which is calling the value of hSliders:
alert(document.Form1.hSliders.value)
this alert is showing nothing although it should display string.
i check the view source also control's value is getting populated.
I wish to use J.S. to obtain the screen ht and put this value into a hidden
field for posting. so that I can then use it in a php file.
A simplified script of what I am trying to do is below, but it doesnt work.
I have not used javascript much and I'm sure its straight forward.
<script type="text/javascript" language="javascript">
var ht = document.body.clientHeight;
</script>
<form action="my.php" method="post">
input name="screenht" type="hidden" value="ht"
</form>