{"id":10511,"date":"2014-11-07T05:05:07","date_gmt":"2014-11-06T18:05:07","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10511"},"modified":"2016-08-31T17:39:46","modified_gmt":"2016-08-31T07:39:46","slug":"phpjavascript-media-synchronize-cross-browser-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/phpjavascript-media-synchronize-cross-browser-tutorial\/","title":{"rendered":"PHP\/Javascript Media Synchronize Cross Browser Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP\/Javascript Media Synchronize Cross Browser Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/SyncMoreMediaFileBrowsing_Primer.jpg\" title=\"PHP\/Javascript Media Synchronize Cross Browser Tutorial\"  style=\"float:left;\" id='aqqqsssqsqqxixi'    \/><\/a><p class=\"wp-caption-text\">PHP\/Javascript Media Synchronize Cross Browser Tutorial<\/p><\/div>\n<p>Well might we call this tutorial <i>&#8220;cross&#8221;<\/i> browser, because there are a few <i>&#8220;cross&#8221;<\/i> browsers after the goings on &#8230; and there is still more to do &#8230; but &#8230; continuing on with the Media Synchronize ideas today &#8230; let&#8217;s retrace &#8230;<\/p>\n<p>A few (more) days back with <a target=_blank href='#pjmsfut' title='PHP\/Javascript Media Synchronize Follow Up Tutorial'>PHP\/Javascript Media Synchronize Follow Up Tutorial<\/a> as shown below, we continued on developing a Media Synchronizing web application, building on the framework for file browsing with PHP on the web either at the client computer or the web server computer, discussing the zipping of files, and the need for PHP as a server-side language, and great (ie. easy) interpreter of <a target=\"_blank\" title=\"Data URLs information from Wikipedia ... thanks\" href=\"http:\/\/en.wikipedia.org\/wiki\/Data_URI_scheme\">data urls<\/a> (you just use the PHP <a target=_blank title='PHP file_get_contents() method' href='http:\/\/php.net\/manual\/en\/function.file-get-contents.php'>file_get_contents()<\/a> method).<\/p>\n<p>It worked okay with Firefox, our favourite web browser here, but there were issues with others, and, like we said earlier, there are still some issues, but we are further down the line.<\/p>\n<p>It&#8217;s been a bit more than a week since we discussed media files and the playing of these, with the cross-browser issues and the like, with the <a target=_blank href='#avfut' title='Audio Video Follow Up Tutorial'>Audio Video Follow Up Tutorial<\/a> as shown way below, and the old tutorial above had code that worked okay on the local MAMP web server here, as you&#8217;ll notice from its http:\/\/localhost:888\/ URLs, but, sadly, the optimist in me got the better of me, and it didn&#8217;t work as well on the rjmprogramming.com.au domain.   As for why, am not absolutely certain, but no use crying over spilt milk &#8230; it gets that oily look that none of us like &#8230; instead had to ditch the dream of using a data url approach, and today took the step back necessary in such circumstances, sometimes, and began again with a new software component.<\/p>\n<p>Today we (again try to) interface these two ideas so that when you file browse, if you pick an audio and a video file when you file browse the PHP code will arrange a prompt you can answer to attempt to synchronize the playing of the audio and video data, coming out of the file browsing PHP as a data url interpreted in PHP with file_get_contents() method, and making use of Javascript&#8217;s <a target=_blank title='Javascript setInterval() method information from w3schools ... thanks' href='http:\/\/www.w3schools.com\/jsref\/met_win_setinterval.asp'>setInterval()<\/a> method to introduce a generic <i>lookerer upperer<\/i> over the top of an existing arrangement.<\/p>\n<p>We had to change five PHP software components to make this interface work:<\/p>\n<ul>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.html--GETME\" title=\"audio_video.html\">audio_video.html<\/a> the changes for which are explained with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.html--GETME\" title=\"audio_video.php\">audio_video.html<\/a><\/li>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.php-GETME\" title=\"audio_video.php\">audio_video.php<\/a> the changes for which are explained with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.php-GETME\" title=\"audio_video.php\">audio_video.php<\/a><\/li>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_generic.php----GETME\" title=\"audio_generic.php\">audio_generic.php<\/a> the changes for which are explained with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/audio_generic.php----GETME\" title=\"audio_generic.php\">audio_generic.php<\/a><\/li>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/video_generic.php----GETME\" title=\"video_generic.php\">video_generic.php<\/a> the changes for which are explained with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/video_generic.php----GETME\" title=\"video_generic.php\">video_generic.php<\/a><\/li>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php--------GETME\" title=\"fileinfotable.php\">fileinfotable.php<\/a> the changes for which are explained with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php--------GETME\" title=\"fileinfotable.php\">fileinfotable.php<\/a><\/li>\n<\/ul>\n<p>There was, and still is, an absolutely brilliant link called <a target=_blank href='http:\/\/www.html5rocks.com\/en\/tutorials\/file\/dndfiles\/' title='Reading local files in JavaScript - HTML5 Rocks'>Reading local files in JavaScript &#8211; HTML5 Rocks<\/a> which helped enormously with the <a target=_blank title='File API' href='http:\/\/www.w3.org\/TR\/file-upload\/'>file<\/a> <a target=_blank title='Web API information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Web_API'>API<\/a> aspects to the <i>&#8220;truncated&#8221;<\/i> uploading functionality methods to file browse with PHP and HTML and Javascript on the web (with a URL).  And then this <a target=_blank href='http:\/\/stackoverflow.com\/questions\/7852005\/how-to-check-if-a-url-exists-with-php-and-make-it-time-out-after-a-number-of-sec' title='Useful link'>useful link<\/a> helped enormously with the curl usage &#8230; thanks.<\/p>\n<p>Hope you get an idea or four out of today&#8217;s tutorial.  By the way, if the synchronization is not spot on for the first run through, due to upload speed issues, it is worth trying to click the <i>Synchronize<\/i> link for which there is underlying Javascript logic to try to start synchronizing the audio with the video again.   This is good for one go, but subsequent goes may require you to go back to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php\" title=\"Click picture\">live run<\/a>.<\/p>\n<hr \/>\n<p id=\"pjmsfut\">Previous relevant <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10499\" title=\"PHP\/Javascript Media Synchronize Follow Up Tutorial\">PHP\/Javascript Media Synchronize Follow Up Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP\/Javascript Media Synchronize Follow Up Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/SyncMediaFileBrowsing_Primer.png\" title=\"PHP\/Javascript Media Synchronize Follow Up Tutorial\"  style=\"float:left;\" id='qqqsssqsqqxixi'   onmouseover=' this.src=this.src.replace(\".jpg\",\".PNG\").replace(\".png\",\".GIF\").replace(\".gif\",\".JPEG\").replace(\".jpeg\",\".JPG\").replace(\".JPG\",\".jpg\").replace(\".GIF\",\".gif\").replace(\".JPEG\",\".jpeg\").replace(\".PNG\",\".png\"); '   \/><\/a><p class=\"wp-caption-text\">PHP\/Javascript Media Synchronize Follow Up Tutorial<\/p><\/div>\n<p>A few days back with <a target=_blank href='#pjmsfbt' title='PHP\/Javascript Media Synchronize File Browsing Tutorial'>PHP\/Javascript Media Synchronize File Browsing Tutorial<\/a> as shown below, we continued on developing a Media Synchronizing web application, building on the framework for file browsing with PHP on the web either at the client computer or the web server computer, discussing the zipping of files, and the need for PHP as a server-side language, and great (ie. easy) interpreter of <a target=\"_blank\" title=\"Data URLs information from Wikipedia ... thanks\" href=\"http:\/\/en.wikipedia.org\/wiki\/Data_URI_scheme\">data urls<\/a> (you just use the PHP <a target=_blank title='PHP file_get_contents() method' href='http:\/\/php.net\/manual\/en\/function.file-get-contents.php'>file_get_contents()<\/a> method).<\/p>\n<p>It&#8217;s been a bit more than a week since we discussed media files and the playing of these, with the cross-browser issues and the like, with the <a target=_blank href='#avfut' title='Audio Video Follow Up Tutorial'>Audio Video Follow Up Tutorial<\/a> as shown way below, and the old tutorial above had code that worked okay on the local MAMP web server here, as you&#8217;ll notice from its http:\/\/localhost:888\/ URLs, but, sadly, the optimist in me got the better of me, and it didn&#8217;t work as well on the rjmprogramming.com.au domain.   As for why, am not absolutely certain, but no use crying over spilt milk &#8230; it gets that oily look that none of us like &#8230; instead had to ditch the dream of using a data url approach, and today took the step back necessary in such circumstances, sometimes, and began again with a new software component.<\/p>\n<p>Today we (again try to) interface these two ideas so that when you file browse, if you pick an audio and a video file when you file browse the PHP code will arrange a prompt you can answer to attempt to synchronize the playing of the audio and video data, coming out of the file browsing PHP as a data url interpreted in PHP with file_get_contents() method, and making use of Javascript&#8217;s <a target=_blank title='Javascript setInterval() method information from w3schools ... thanks' href='http:\/\/www.w3schools.com\/jsref\/met_win_setinterval.asp'>setInterval()<\/a> method to introduce a generic <i>lookerer upperer<\/i> over the top of an existing arrangement.<\/p>\n<p>We had to change four PHP software components to make this interface work:<\/p>\n<ul>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.php_GETME\" title=\"audio_video.php\">audio_video.php<\/a> is the new software component as mentioned above<\/li>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_generic.php---GETME\" title=\"audio_generic.php\">audio_generic.php<\/a> the changes for which are explained with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/audio_generic.php---GETME\" title=\"audio_generic.php\">audio_generic.php<\/a><\/li>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/video_generic.php---GETME\" title=\"video_generic.php\">video_generic.php<\/a> the changes for which are explained with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/video_generic.php---GETME\" title=\"video_generic.php\">video_generic.php<\/a><\/li>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php-------GETME\" title=\"fileinfotable.php\">fileinfotable.php<\/a> the changes for which are explained with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php-------GETME\" title=\"fileinfotable.php\">fileinfotable.php<\/a><\/li>\n<\/ul>\n<p>There was, and still is, an absolutely brilliant link called <a target=_blank href='http:\/\/www.html5rocks.com\/en\/tutorials\/file\/dndfiles\/' title='Reading local files in JavaScript - HTML5 Rocks'>Reading local files in JavaScript &#8211; HTML5 Rocks<\/a> which helped enormously with the <a target=_blank title='File API' href='http:\/\/www.w3.org\/TR\/file-upload\/'>file<\/a> <a target=_blank title='Web API information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Web_API'>API<\/a> aspects to the <i>&#8220;truncated&#8221;<\/i> uploading functionality methods to file browse with PHP and HTML and Javascript on the web (with a URL).  And then this <a target=_blank href='http:\/\/stackoverflow.com\/questions\/7852005\/how-to-check-if-a-url-exists-with-php-and-make-it-time-out-after-a-number-of-sec' title='Useful link'>useful link<\/a> helped enormously with the curl usage &#8230; thanks.<\/p>\n<p>Hope you get an idea or three out of today&#8217;s tutorial.  By the way, if the synchronization is not spot on for the first run through, due to upload speed issues, it is worth trying to click the <i>Synchronize<\/i> link for which there is underlying Javascript logic to try to start synchronizing the audio with the video again.   This is good for one go, but subsequent goes may require you to go back to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php\" title=\"Click picture\">live run<\/a>.<\/p>\n<hr \/>\n<p id='pjmsfbt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10477' title='PHP\/Javascript Media Synchronize File Browsing Tutorial'>PHP\/Javascript Media Synchronize File Browsing Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP\/Javascript Media Synchronize File Browsing Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/SynchronizedMedia_FileBrowsing.jpeg\" title=\"PHP\/Javascript Media Synchronize File Browsing Tutorial\"  style=\"float:left;\" id='qqsssqsqqxixi'   onmouseover=' this.src=this.src.replace(\".jpg\",\".PNG\").replace(\".png\",\".BMP\").replace(\".gif\",\".JPEG\").replace(\".jpeg\",\".JPG\").replace(\".bmp\",\".GIF\").replace(\".JPG\",\".jpg\").replace(\".GIF\",\".gif\").replace(\".JPEG\",\".jpeg\").replace(\".PNG\",\".png\").replace(\".BMP\",\".bmp\"); '   \/><\/a><p class=\"wp-caption-text\">PHP\/Javascript Media Synchronize File Browsing Tutorial<\/p><\/div>\n<p>Yesterday with <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10471' title='PHP\/HTML\/Javascript Zipping Files File Browsing Tutorial'>PHP\/HTML\/Javascript Zipping Files File Browsing Tutorial<\/a> as shown below, we continued on with the framework for file browsing with PHP on the web either at the client computer or the web server computer, discussing the zipping of files, and the need for PHP as a server-side language, and great (ie. easy) interpreter of <a target=\"_blank\" title=\"Data URLs information from Wikipedia ... thanks\" href=\"http:\/\/en.wikipedia.org\/wiki\/Data_URI_scheme\">data urls<\/a> (you just use the PHP <a target=_blank title='PHP file_get_contents() method' href='http:\/\/php.net\/manual\/en\/function.file-get-contents.php'>file_get_contents()<\/a> method).<\/p>\n<p>It&#8217;s been about a week since we discussed media files and the playing of these, with the cross-browser issues and the like, with the <a target=_blank href='#avfut' title='Audio Video Follow Up Tutorial'>Audio Video Follow Up Tutorial<\/a> as shown below.<\/p>\n<p>Today we interface these two ideas so that when you file browse, if you pick an audio and a video file when you file browse the PHP code will arrange a prompt you can answer to attempt to synchronize the playing of the audio and video data, coming out of the file browsing PHP as a data url interpreted in PHP with file_get_contents() method, and making use of Javascript&#8217;s <a target=_blank title='Javascript setInterval() method information from w3schools ... thanks' href='http:\/\/www.w3schools.com\/jsref\/met_win_setinterval.asp'>setInterval()<\/a> method to introduce a generic <i>lookerer upperer<\/i> over the top of an existing arrangement.<\/p>\n<p>We had to change three PHP software components to make this interface work:<\/p>\n<ul>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_generic.php--GETME\" title=\"audio_generic.php\">audio_generic.php<\/a> the changes for which are explained with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/audio_generic.php--GETME\" title=\"audio_generic.php\">audio_generic.php<\/a><\/li>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/video_generic.php--GETME\" title=\"video_generic.php\">video_generic.php<\/a> the changes for which are explained with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/video_generic.php--GETME\" title=\"video_generic.php\">video_generic.php<\/a><\/li>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php------GETME\" title=\"fileinfotable.php\">fileinfotable.php<\/a> the changes for which are explained with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php------GETME\" title=\"fileinfotable.php\">fileinfotable.php<\/a><\/li>\n<\/ul>\n<p>There was an absolutely brilliant link called <a target=_blank href='http:\/\/www.html5rocks.com\/en\/tutorials\/file\/dndfiles\/' title='Reading local files in JavaScript - HTML5 Rocks'>Reading local files in JavaScript &#8211; HTML5 Rocks<\/a> which helped enormously with the <a target=_blank title='File API' href='http:\/\/www.w3.org\/TR\/file-upload\/'>file<\/a> <a target=_blank title='Web API information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Web_API'>API<\/a> aspects to the <i>&#8220;truncated&#8221;<\/i> uploading functionality methods to file browse with PHP and HTML and Javascript on the web (with a URL).  And then this <a target=_blank href='http:\/\/stackoverflow.com\/questions\/7852005\/how-to-check-if-a-url-exists-with-php-and-make-it-time-out-after-a-number-of-sec' title='Useful link'>useful link<\/a> helped enormously with the curl usage &#8230; thanks.<\/p>\n<p>Hope you get an idea out of today&#8217;s tutorial.<\/p>\n<hr \/>\n<p id='avfut'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10380' title='Audio Video Follow Up Tutorial'>Audio Video Follow Up Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Audio Video Follow Up Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.gif\" title=\"Audio Video Follow Up Tutorial\" id='xqzx' onmouseover=\" this.src=this.src.replace('.png','.GIF').replace('.gif','.png').replace('.GIF','.gif');  \"  \/><\/a><p class=\"wp-caption-text\">Audio Video Follow Up Tutorial<\/p><\/div>\n<p>The major web browsers on a Mac laptop or Windows laptop have differences in rendering and methods by which they play media files.  With this in mind, today&#8217;s tutorial attempts to play audio or video or audio and video together in synchronization (augmenting yesterday&#8217;s <a target=_blank href='#avpt' title='Audio Video Primer Tutorial'>Audio Video Primer Tutorial<\/a> as shown below) across the major browsers, and for some mobile platforms, where &#8230;<\/p>\n<ul>\n<li>the audio and\/or video plays (asking for interactive input with the mobile platforms) as soon as the webpage loads &#8230; annoying if you are not informed of this, but today we really really feel like we should really really warn you &#8230; so we really think that &#8230; you should really be warned &#8230; clicking the buttons could load audio or video or both<font size=1>, really<\/font><\/li>\n<li>show controls (in a minimalist style for mobile platforms)<\/li>\n<li>loop the audio and\/or video file(s), for non-mobile web, but not for mobile platforms<\/li>\n<li>we start to cater for mime types outside audio\/ogg, audio\/mp3, audio\/wav, video\/ogg, video\/mp4, video\/webm &#8230; as an iPhone, for instance, can output videos of video\/mp4 *.m4v format &#8230; and for help here we thank &#8230;\n<ol>\n<li><a target=_blank href='http:\/\/stackoverflow.com\/questions\/2280394\/how-can-i-check-if-a-url-exists-via-php' tutle='PHP url_exists() ideas'>PHP url_exists() ideas<\/a><\/li>\n<li><a target=_blank href='http:\/\/en.wikipedia.org\/wiki\/Internet_media_type' title='Mime type information from Wikipedia ... thanks'>Mime type<\/a> lists <a target=_blank href='http:\/\/webdesign.about.com\/od\/multimedia\/a\/mime-types-by-content-type.htm'>here<\/a> and <a target=_blank href='http:\/\/voice.firefallpro.com\/2012\/03\/html5-audio-video-mime-types.html'>here<\/a> &#8230; thanks<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p>&#8230; as you can see there are quite a few scenarios &#8230; let alone considering the audio and\/or video (default) format(s) which the <i>&lt;audio&gt;<\/i> and <i>&lt;video&gt;<\/i> tags support for this web application &#8230; as far as that goes, consult the w3schools <a target=_blank title='Video tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_audio.asp'>audio link<\/a> and\/or <a target=_blank title='Video tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_video.asp'>video link<\/a>.<\/p>\n<p>Along the way you may need some (online) audio and\/or video format conversion functionality, and for this we like <a target=_blank title='Audio and\/or Video conversions online' href='http:\/\/www.online-convert.com'>Audio and\/or Video conversions online<\/a> (for example).<\/p>\n<p>You may want to read more about other similar issues, which are sometimes referred to as <a target=_blank title='Wikipedia information regarding cross-browser' href='http:\/\/en.wikipedia.org\/wiki\/Cross-browser'>cross-browser<\/a> issues.<\/p>\n<p>So in this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.jpg\">tutorial<\/a> you can imagine Internet Explorer 11 and Safari, Opera and Chrome, and see Firefox, playing an audio and\/or a video file.  Here is a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.html\">live run<\/a> link, which for its default scenario refers to <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=7474' title='GoToMeeting Primer Tutorial'>GoToMeeting Primer Tutorial<\/a>.<\/p>\n<p>Here is some HTML programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.html-GETME\" title=\"audio_video.html\">audio_video.html<\/a> supervising audio  PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_generic.php-GETME\" title=\"audio_generic.php\">audio_generic.php<\/a> and video  PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/video_generic.php-GETME\" title=\"video_generic.php\">video_generic.php<\/a> to oversee the playing of audio or video or both, synchronized.   If there are complex cross-browser issues they can be resolved by a server-side language such as PHP (or ASP.Net) ahead of the HTML reaching the client&#8217;s web browser.<\/p>\n<p>The difference links for the less widely friendly code versions of the tutorial below are &#8230; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.html-GETME\" title=\"audio_video.html\">audio_video.html<\/a> supervising audio PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/audio_generic.php-GETME\" title=\"audio_generic.php\">audio_generic.php<\/a> and video  PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/video_generic.php-GETME\" title=\"video_generic.php\">video_generic.php<\/a><\/p>\n<hr \/>\n<p id='avpt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10360' title='Audio Video Primer Tutorial'>Audio Video Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Audio Video Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.jpg\" title=\"Audio Video Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Audio Video Primer Tutorial<\/p><\/div>\n<p>The major web browsers on a Mac laptop or Windows laptop have differences in rendering and methods by which they play media files.  With this in mind, today&#8217;s tutorial attempts to play audio or video or audio and video together in synchronization (augmenting yesterday&#8217;s <a target=_blank href='#vowbpt' title='Video on Web Browser Primer Tutorial'>Video on Web Browser Primer Tutorial<\/a> as shown below) across the major browsers where &#8230;<\/p>\n<ul>\n<li>the audio and\/or video plays as soon as the webpage loads &#8230; annoying if you are not informed of this, but today we really really feel like we should really really warn you &#8230; so we really think that &#8230; you should really be warned &#8230; clicking the buttons could load audio or video or both<font size=1>, really<\/font><\/li>\n<li>show controls<\/li>\n<li>loop the audio and\/or video file(s)<\/li>\n<\/ul>\n<p>&#8230; as you can see there are quite a few scenarios &#8230; let alone considering the audio and\/or video format(s) &#8230; as far as that goes, consult the w3schools <a target=_blank title='Video tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_audio.asp'>audio link<\/a> and\/or <a target=_blank title='Video tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_video.asp'>video link<\/a>.<\/p>\n<p>Along the way you may need some (online) audio and\/or video format conversion functionality, and for this we like <a target=_blank title='Audio and\/or Video conversions online' href='http:\/\/www.online-convert.com'>Audio and\/or Video conversions online<\/a> (for example).<\/p>\n<p>You may want to read more about other similar issues, which are sometimes referred to as <a target=_blank title='Wikipedia information regarding cross-browser' href='http:\/\/en.wikipedia.org\/wiki\/Cross-browser'>cross-browser<\/a> issues.<\/p>\n<p>So in this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.jpg\">tutorial<\/a> you can imagine Internet Explorer 11 and Safari, Opera and Chrome, and see Firefox, playing an audio and\/or a video file.  Here is a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.html\">live run<\/a> link, which for its default scenario refers to <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=7474' title='GoToMeeting Primer Tutorial'>GoToMeeting Primer Tutorial<\/a>.<\/p>\n<p>Here is some HTML programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.html_GETME\" title=\"audio_video.html\">audio_video.html<\/a> supervising audio  PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/audio_generic.php_GETME\" title=\"audio_generic.php\">audio_generic.php<\/a> and video  PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/video_generic.php_GETME\" title=\"video_generic.php\">video_generic.php<\/a> to oversee the playing of audio or video or both, synchronized.   If there are complex cross-browser issues they can be resolved by a server-side language such as PHP (or ASP.Net) ahead of the HTML reaching the client&#8217;s web browser.<\/p>\n<hr \/>\n<p id='vowbpt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10352' title='Video on Web Browser Primer Tutorial'>Video on Web Browser Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/nala.php\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Video on Web Browser Primer Tutorial ... clicking plays video file\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/nala.jpg\" title=\"Video on Web Browser Primer Tutorial ... clicking plays video file\"  \/><\/a><p class=\"wp-caption-text\">Video on Web Browser Primer Tutorial ... clicking plays video file<\/p><\/div>\n<p>The major web browsers on a Mac laptop or Windows laptop have differences in rendering and methods by which they play media files.  With this in mind, today&#8217;s tutorial attempts to play video (augmenting yesterday&#8217;s <a target=_blank href='#awbpt' title='Audio on Web Browser Primer Tutorial'>Audio on Web Browser Primer Tutorial<\/a> as shown below) across the major browsers where &#8230;<\/p>\n<ul>\n<li>the video plays as soon as the webpage loads &#8230; annoying if you are not informed of this, but today we feel like we should warn you &#8230; so we think that &#8230; you should be warned &#8230; clicking the picture should load a video file<\/li>\n<li>show controls<\/li>\n<li>loop the video file<\/li>\n<\/ul>\n<p>&#8230; as you can see there are quite a few scenarios &#8230; let alone considering the video format &#8230; as far as that goes, consult this w3schools <a target=_blank title='Video tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_video.asp'>link<\/a>.<\/p>\n<p>Along the way you may need some (online) video format conversion functionality, and for this we like <a target=_blank title='M4V to WEBM online' href='http:\/\/www.online-convert.com'>M4V to OGG conversions online<\/a> (for example).<\/p>\n<p>Where can you source some video files? &#8230; We (probably all) like <a target=_blank title='YouTube' href='http:\/\/youtube.com'>YouTube<\/a> for this,  particularly as you get great help with their wonderful advice on how to embed the video into your own HTML.<\/p>\n<p>You may want to read more about other similar issues, which are sometimes referred to as <a target=_blank title='Wikipedia information regarding cross-browser' href='http:\/\/en.wikipedia.org\/wiki\/Cross-browser'>cross-browser<\/a> issues.<\/p>\n<p>So in this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/nala.jpg\">tutorial<\/a> you can imagine Internet Explorer 11 and see Firefox, Safari, Opera and Chrome playing a video file.  Here is a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/nala.php\">live run<\/a> link.<\/p>\n<p>Here is some PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/nala.php_GETME\" title=\"nala.php\">nala.php<\/a> to play this video of Nala the dog playing Hide and Seek (one of her favourite games).   If there are complex cross-browser issues they can be resolved by a server-side language such as PHP (or ASP.Net) ahead of the HTML reaching the client&#8217;s web browser.<\/p>\n<hr \/>\n<p id='awbpt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10336' title='Audio on Web Browser Primer Tutorial'>Audio on Web Browser Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/wind.php\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Audio on Web Browser Primer Tutorial ... clicking plays audio file\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/wind.jpg\" title=\"Audio on Web Browser Primer Tutorial ... clicking plays audio file\"  \/><\/a><p class=\"wp-caption-text\">Audio on Web Browser Primer Tutorial ... clicking plays audio file<\/p><\/div>\n<p>The major web browsers on a Mac laptop or Windows laptop have differences in rendering and methods by which they play media files.  With this in mind, today&#8217;s tutorial attempts to play audio across the major browsers where &#8230;<\/p>\n<ul>\n<li>the audio plays as soon as the webpage loads &#8230; annoying if you are not informed of this, but today we warn you &#8230; so &#8230; be warned &#8230; clicking the picture should load an audio file<\/li>\n<li>show controls<\/li>\n<li>loop the audio file<\/li>\n<\/ul>\n<p>&#8230; as you can see there are quite a few scenarios &#8230; let alone considering the audio format &#8230; as far as that goes, consult this w3schools <a target=_blank title='Audio tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_audio.asp'>link<\/a>.<\/p>\n<p>Along the way you may need some (online) audio format conversion functionality, and for this we like <a target=_blank title='MP3 to OGG online' href='http:\/\/www.online-convert.com'>MP3 to OGG conversions online<\/a> (for example).<\/p>\n<p>Where can you source some audio files? &#8230; We like <a target=_blank title='Sound Bible online audio file repository' href='http:\/\/soundbible.com'>Sound Bible<\/a> for this, sometimes, as for our wind sound today, also used with <a target=_blank title='Battleships and Cruisers game' href='http:\/\/www.rjmprogramming.com.au\/Games\/Battleshipsandcruisers\/index.php?isMobile=n'>Battleships and Cruisers<\/a> game here at this domain.<\/p>\n<p>You may want to read more about other similar issues, which are sometimes referred to as <a target=_blank title='Wikipedia information regarding cross-browser' href='http:\/\/en.wikipedia.org\/wiki\/Cross-browser'>cross-browser<\/a> issues.<\/p>\n<p>So in this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/wind.jpg\">tutorial<\/a> you can imagine Internet Explorer 11 and see Firefox, Safari, Opera and Chrome playing an audio file.  Here is a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/wind.php\">live run<\/a> link.<\/p>\n<p>Here is some PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/wind.php_GETME\" title=\"wind.php\">wind.php<\/a> to play this wind sound audio file.   If there are complex cross-browser issues they can be resolved by a server-side language such as PHP (or ASP.Net) ahead of the HTML reaching the client&#8217;s web browser.<\/p>\n<p>We&#8217;ve used some of these audio techniques, too, with ESL (teaching) as below:<\/p>\n<ul>\n<li><a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=1154' title='A Media Job for Listening Task Class webpage Tutorial'>A Media Job for Listening Task Class webpage Tutorial<\/a> explains in some detail the making of ESL listening task <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=1152' title='English Learning \u2013 Listening Class \u2013 Tapioca Five Ways'>English Learning \u2013 Listening Class \u2013 Tapioca Five Ways<\/a><\/li>\n<li>ESL listening task <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=2608' title='English Learning \u2013 Listening Class \u2013 Love at First Bite'>English Learning \u2013 Listening Class \u2013 Love at First Bite<\/a><\/li>\n<li><a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=683' title='English Phonics Learning Ideas'>English Phonics Learning Ideas<\/a><\/li>\n<\/ul>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d10336' onclick='var dv=document.getElementById(\"d10336\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=audio\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10336' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d10352' onclick='var dv=document.getElementById(\"d10352\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=video\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10352' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d10360' onclick='var dv=document.getElementById(\"d10360\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=media\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10360' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d10380' onclick='var dv=document.getElementById(\"d10380\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=mobile\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10380' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d10477' onclick='var dv=document.getElementById(\"d10477\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=media\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10477' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d10499' onclick='var dv=document.getElementById(\"d10499\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=MAMP\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10499' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d10511' onclick='var dv=document.getElementById(\"d10511\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=video\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10511' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Well might we call this tutorial &#8220;cross&#8221; browser, because there are a few &#8220;cross&#8221; browsers after the goings on &#8230; and there is still more to do &#8230; but &#8230; continuing on with the Media Synchronize ideas today &#8230; let&#8217;s &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/phpjavascript-media-synchronize-cross-browser-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[276,576,652,760,932,997,1670,1319],"class_list":["post-10511","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-cross-browser-issues","tag-html","tag-javascript","tag-media","tag-php","tag-programming","tag-synchronize","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/10511"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=10511"}],"version-history":[{"count":1,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/10511\/revisions"}],"predecessor-version":[{"id":24603,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/10511\/revisions\/24603"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=10511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=10511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=10511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}