sorry for my ignorance.
How is a musical track (say a WAV file) played in a web application ?
The file is to be loaded at the server-side.
Thank you
Duilio

Mailing lists / lazarus / 2014-02
12 messages · 5 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
sorry for my ignorance.
How is a musical track (say a WAV file) played in a web application ?
The file is to be loaded at the server-side.
Thank you
Duilio
I found the code below and it works.
However, it seems a bit primitive to me.
What if the music is 2h long ?
How can I start, stop then restart the music and control the volume as (say) youtube does ?
Maybe I can find a commercial library ?
Thank you
Duilio
<!DOCTYPE html>
<html>
<body>
<embed height="50" width="100" src="horse.mp3">
<p>If you cannot hear the sound, your computer or browser doesn't support the sound format.</p>
<p>Or, you have your speakers turned off :)</p>
</body>
</html>
2014-02-12 21:51 GMT+01:00 duilio foschi :
gotcha!
It is easy !
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
The control attribute adds video controls, like play, pause, and volume.
2014-02-12 22:33 GMT+01:00 duilio foschi :
duilio foschi wrote<video width="320" height="240" controls>
This requires the browser to support HTML5 (nowadays most do)
-Michael
Not all HTML5 browsers support multi-media. Supported file formats depends on the operating system and browser. Chrome is by far the most widely versatile. FireFox did not spring for MP3 licensing. Firefox requires streams as ogg. So don't expect much media support from them.
Hi Andrew,
which is a conservative way to go for a music player on the web ?
Which is method used by - say - YouTube ?
Thank you
Duilio
2014-02-13 14:37 GMT+01:00 Andrew Brunner :
Well, those of us who depend on browser technologies are pushing HTML5 standards hard. But mpeg is the standard streaming format used for video and audio. Since FireFox is an open sourced initiative they feel that they are "selling out" to include a licensed streaming component for mpeg. Their way around that is to include flash player [out of the box].
Having said that - at least presently - you would have to use a flash player wrapper as a fallback if the browser is FireFox. As for Chrome you would be well off using the <audio> tag to construct an instance.
If you know JavaScript the Aurawin VDM comes with extensive streaming media support via HTML5. You can download it at
https://aurawin.com/downloads/
Look in the /core/vdm/music/coMusic.js file. While it is an entire app built around a certain framework - you can certainly view the code to learn how build your own player for your own web page.
Look in the /core/vdm/music/Player.js file for my "wrapper" that just encapsulates the browser's playback implementation.
There are politics involved with regard to streaming support. I feel that "pressure" should be applied to FireFox for lack of support for mpeg. HTML5 is supposed to "pave the way" to have a native solution for streaming - e.g. to help developers depend less on proprietary components like FLASH; and move into depending on the browser.
I'm sure egos are involved with regard to the lack of mpeg support. However, the market is clearly demanding streaming capabilities for mpeg. Ogg support (and that's with Google backing) has never materialized as expected. So it's time for FireFox to invest back into their browser and include support for mpeg audio and video. They have the money. They just need to realize they are not compromising on their standards but embracing a great piece of technology that is mpeg.
which is a conservative way to go for a music player on the web ? Which is method used by…
youtube was using a flash video player thing... i don't know what they are using now that google owns them... i've not tried to save any of their videos to local storage in a year or two...
Well, those of us who depend on browser technologies are pushing HTML5 standards hard. …
Firefox supports H.264/AAC/MP3 video/audio playback but only when it is already installed in the OS. See
https://bugzilla.mozilla.org/show_bug.cgi?id=799318 -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140213/35b6cb82/attachment-0001.html>
this is a nice suite of audio tests for html5 browsers :)
The last version of Mozilla Firefox (stub 27.0) does not support the playback of MP3 in my PC running w7.
Can one install a MP3 video player into w7 or w8 so that MF will be able to use it ?
Thank you
Duilio
2014-02-13 18:52 GMT+01:00 Kostas Michalopoulos :
Possibly. In my computer the above site says that MP3 is supported (only the second and third features aren't supported).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140213/9edb6430/attachment.html>
Not all HTML5 browsers support multi-media. Supported file formats depends on the…
Andrew Brunner wroteChrome is by far the most widely versatile. FireFox did not spring for MP3 licensing. Firefox requires streams as ogg.
For Videos I do on on Websites I now use HTM5 with both mp4 and ogg. With that most browsers are happy (but not the old IE that is the latest version installable on W-XP).
Before that I did Flash videos, but here the mobile Apple devices decline.
-Michael