Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-02

play video and music from the web

12 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

duilio foschi

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

Reply by email

duilio foschi
to duilio foschi

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 :

Show quoted text 8 lines
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

Reply by email

duilio foschi
to 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 :

Show quoted text 36 lines
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 : > 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

Reply by email

Andrew Brunner
to Michael Schnell

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.

Michael Schnell wrote 11 lines
On 02/12/2014 10:36 PM, duilio foschi wrote: > <video width="320" height="240" controls> This requires the browser to support HTML5 (nowadays most do) -Michael -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Andrew Brunner Aurawin LLC 512.850.3117 https://aurawin.com/ Aurawin is a great new way to store, share and enjoy your photos, videos, music, and more.

Reply by email

duilio foschi
to Andrew Brunner

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 :

Show quoted text 42 lines
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. On 02/13/2014 03:09 AM, Michael Schnell wrote: > > On 02/12/2014 10:36 PM, duilio foschi wrote: >> >> <video width="320" height="240" controls> > > This requires the browser to support HTML5 (nowadays most do) > > -Michael > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- Andrew Brunner Aurawin LLC 512.850.3117 https://aurawin.com/ Aurawin is a great new way to store, share and enjoy your photos, videos, music, and more. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Andrew Brunner
to duilio foschi

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.

duilio foschi wrote 57 lines
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 : > 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. > > > > > On 02/13/2014 03:09 AM, Michael Schnell wrote: >> On 02/12/2014 10:36 PM, duilio foschi wrote: >>> <video width="320" height="240" controls> >> This requires the browser to support HTML5 (nowadays most do) >> >> -Michael >> >> -- >> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- > Andrew Brunner > > Aurawin LLC > 512.850.3117 > https://aurawin.com/ > > Aurawin is a great new way to store, share and enjoy your photos, videos, > music, and more. > > > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Andrew Brunner Aurawin LLC 512.850.3117 https://aurawin.com/ Aurawin is a great new way to store, share and enjoy your photos, videos, music, and more.

Reply by email

waldo kitty
to duilio foschi: which is a conservative way to go for a music player on the web ? Which is method used by…
duilio foschi wrote 5 lines
Hi Andrew, which is a conservative way to go for a music player on the web ? Which is method used by - say - YouTube ?

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...

NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted.

Reply by email

Kostas Michalopoulos
to Andrew Brunner: Well, those of us who depend on browser technologies are pushing HTML5 standards hard. …
Andrew Brunner wrote 5 lines
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.

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>

Reply by email

duilio foschi
to Kostas Michalopoulos

http://areweplayingyet.org/

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 :

Show quoted text 21 lines
On Thu, Feb 13, 2014 at 3:28 PM, Andrew Brunner wrote: > > 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. 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 -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Kostas Michalopoulos
to duilio foschi

Possibly. In my computer the above site says that MP3 is supported (only the second and third features aren't supported).

duilio foschi wrote 48 lines
http://areweplayingyet.org/ 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 < >: > On Thu, Feb 13, 2014 at 3:28 PM, Andrew Brunner > wrote: >> >> 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. > > > 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 > > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140213/9edb6430/attachment.html>

Reply by email

Michael Schnell
to Andrew Brunner: Not all HTML5 browsers support multi-media. Supported file formats depends on the…
Andrew Brunner wrote
Chrome 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

Reply by email