These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:06 pm Advanced search

<audio> and <video> source changing

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

<audio> and <video> source changing

Postby dandart » Sat Apr 25, 2009 8:50 pm

* What is the problem you are trying to solve?
Change <audio src="something"> to <audio src="somethingelse"> dynamically

* What is the feature you are suggesting to help solve it?
Make src read/write

* Why do you think browsers would implement this feature?
It is useful to have one player to play lots of things

* Why do you think authors would use this feature?
It's pretty handy.
* What evidence is there that this feature is desparately needed?
My Web OS will get bogged down with huge scripts otherwise.
dandart
<h6>
 
Posts: 1
Joined: Sat Apr 25, 2009 8:47 pm

Re: <audio> and <video> source changing

Postby zcorpan » Wed May 27, 2009 5:42 pm

dandart wrote:* What is the problem you are trying to solve?
Change <audio src="something"> to <audio src="somethingelse"> dynamically

* What is the feature you are suggesting to help solve it?
Make src read/write
src is already read/write.

dandart wrote: * Why do you think browsers would implement this feature?
It is useful to have one player to play lots of things

* Why do you think authors would use this feature?
It's pretty handy.
* What evidence is there that this feature is desparately needed?
My Web OS will get bogged down with huge scripts otherwise.
What do you want to happen when you set src? Do you want load() to be called?

It seems pretty simple to write a wrapper function like so:
Code: Select all
function setSrc(elm, src) {
  elm.src = src;
  elm.load();
}


...and then instead of doing:
Code: Select all
video.src = 'foo';
do
Code: Select all
setSrc(video, 'foo');
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden


Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 1 guest