Jaswinder Posted June 14, 2013 Share Posted June 14, 2013 hello friends... i have uploaded the videos,, now i want to see it... i uses the <iframe> tag ,but it shows video only in firefox and also starts on page load... which i dont want,,,,, For chrome HTML5 video tag is being used... and i dont know about IE... so how should i write my code??? here is my code :- <?php while($f=mysql_fetch_array($q)) { if($f['video'] != ' ') { ?> <li> <video controls="controls" width="450" height="280"> <source src='upload/<?php echo $f["event"]; ?>/video/<?php echo $f["video"];?>' type="video/mp4" height="200" width="200"> </video></li><br /> <iframe src="upload/<?php echo $f["event"]; ?>/video/<?php echo $f["video"];?>" height="200" width="200"></iframe> <?php } }?> How could i put condtions for browsers the chrome uses video tag and not iframe tag.., as now it shows two videos ,, but working other blank(obviously for iframe tag)... and vice-versa for firefox... and what to do for IE Quote Link to comment https://forums.phpfreaks.com/topic/279157-display-uploaded-videos/ Share on other sites More sharing options...
Solution darkfreaks Posted June 14, 2013 Solution Share Posted June 14, 2013 http://techpatterns.com/downloads/php_browser_detection.php this should detect in php the user agent string. Quote Link to comment https://forums.phpfreaks.com/topic/279157-display-uploaded-videos/#findComment-1436072 Share on other sites More sharing options...
Jaswinder Posted June 15, 2013 Author Share Posted June 15, 2013 thanks for link .. it works Quote Link to comment https://forums.phpfreaks.com/topic/279157-display-uploaded-videos/#findComment-1436134 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.