Page 162 - Web Applications (803) Class 12
P. 162

Streaming
              Nowadays, streaming technology continuously provides data to the desktop but does not download the
              whole file. In the ideal situation, the media server that houses the content communicates continuously with
              the client to determine how much data the user can handle. Based on this data, the server modifies the data
              stream as necessary and transmits just the right amount of data to the client.

              The first advantage of streaming is random access. Movies can be viewed at any moment throughout the
              video stream thanks to streaming technology. The settings allow your user to advance to the chosen starting
              point if they only want to see the last five minutes of an hour-long video. Reduced storage requirements on
              the client system are another advantage. Media that is streamed plays instantly on the screen; it isn’t kept in
              memory or on the hard drive.


                                                                                1080p               High Bandwidth
                                 Capture      Encode        Transcode           720p
                                                                                480p                Low Bandwidth


              How to Embed Audio in Webpages

              The <audio> tag can be used to embed audio in HTML. Previously audio could only be played using web
              plugins such as Flash. With HTML 5, audio can now be added to webpages. Three audio formats—MP3, WAV,
              and OGG—are supported by this tag on Chrome, Firefox, Safari, Opera, and Edge. Only the Safari browser
              does not support the OGG audio format.
              Syntax:

                 <audio src=”filename” type=”audiofiletype”>
                 </audio>
              Attributes of <audio> tag are as follows:
                                          Attribute                          Description
                               autoplay                         Specifies to play audio as soon as the
                                                                page loads.
                               controls                         Displays the audio controls.
                               loop                             Restart the audio when it finishes.
                               muted                            Audio will be automatically muted
                                                                when the page loads.
                               src                              Denotes the URL of the audio file.

              Example:

                 <html>
                 <body>
                 <audio controls autoplay loop src=”t1.mp3” type=”audio/mpeg”>
                 </audio> </body>
                 </html>
              This will play the audio automatically when the page loads. The audio will also keep playing in a loop. Adding
              muted after autoplay will let the audio start playing automatically but muted.





                160   Touchpad Web Applications-XII
   157   158   159   160   161   162   163   164   165   166   167